Forcing the use of one index instead other.

Поиск
Список
Период
Сортировка
От Edmundo Robles L.
Тема Forcing the use of one index instead other.
Дата
Msg-id 252EE06031407243B058CF7699226E3A0F893F@mail2.sensacd.com.mx
обсуждение исходный текст
Ответы Re: Forcing the use of one index instead other.  (Ries van Twisk <pg@rvt.dds.nl>)
Re: Forcing the use of one index instead other.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello there!


I have two index  with a same field into them like this:

create index  numberfail on Events (numberfail);
and
create index failtype on  Events (numberfail,eventtype);



then i ran explain analyze  and always  took the numberfail index but i wish  the  failtype index;



this is the query:


SELECT * FROM events WHERE numberfail=194 AND eventtype='XXX';

What should i to do to force the use of failtypeindex????

I though maybe  if  i delete the index numberfail could works, but i don't know  if the  another program
will fail  if the numberfail index does'nt exists.


well, thats all for the moment and i appreciate your time in reading this mail!!!
See you.
--
SENSA Control Digital.
Ing. Edmundo Robles Lopez.
Analista Programador.





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: timestamp no fractional seconds
Следующее
От: Tom Lane
Дата:
Сообщение: Re: timestamp no fractional seconds