performance : index selection

Поиск
Список
Период
Сортировка
От Dmitriy Agafonov
Тема performance : index selection
Дата
Msg-id 3A36666E.15DFA49D@msdw.com
обсуждение исходный текст
Список pgsql-general
Is there any way to specify an index for PostgreSQL to use for a
particular query? My application has to execute a lot of queries like
this : select count(*) from MyTable where IndexedField_1 = value_1 and
IndexedField_2 = value_2 and ... IndexedField_n = value_n

Sometimes Query Planner decides not to use any of the indexes, but that
I can handle by setting enable_seqscan to off.
What's worse is that sometimes a wrong index is used. I know exactly
which index is the best one, because by the time I execute the query I
already have results of all the primitive queries of this kind : select
count(*) from MyTable where IndexedField_i = value_i;  (i = 1..n)
Can I somehow let the Query Planner know about it ?

I am pretty sure I can't do this with 7.0.2 , but what about 7.1 ??

Thanks a lot,
Dmitriy Agafonov.



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postmaster does not start up
Следующее
От: Tom Lane
Дата:
Сообщение: Re: conversion