Search Postgresql Archives

Forcing the use of one index instead other.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux