Re: Join performance

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

 



On Thu, Nov 08, 2007 at 04:47:09PM -0600, Pepe Barbe wrote:
> I am having an issue on PostgreSQL 8.0.12. In the past we had performance 
> issues with the query planner for queries on some tables where we knew we 
> had indexes and it was doing a sequential scan, and for this reason we 
> issue "SET enable_seqscan = FALSE" for some queries.

This is a bad idea in general. Did you really measure that this made queries
run faster? Generally, using an index is not always a win, and the planner
tries to figure out when it isn't. Setting it globally is seldom a good idea
anyway; if it really _is_ a win for a given query, you could always set it
locally in that session.

> Any ideas what could I try to fix this problem?

Re-enable seqscan?

/* Steinar */
-- 
Homepage: http://www.sesse.net/

---------------------------(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

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux