Search Postgresql Archives

Re: Index not being used

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

 



Oh, and you can use the sledge hammer of tuning by using the

set enable_xxx = off

settings for the planner.  It's not a normal way to tune most queries,
but it certainly can let you know if the problem is using the index or
not.

psql mydb
\timing
select count(*) from table where field > 12345;
set enable_seqscan=off;
select count(*) from table where field > 12345;

and compare them.  run each a few times, since the cache will affect
the performance.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[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