Search Postgresql Archives

Re: Slow query with sub-select

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

 



- - <loh.law@xxxxxxxxxxx> writes:
> The weird thing is that before I updated my server the query was about 5 times faster.
> I've googled and I think the problem lies with the under-estimation of the query planner about the number of rows in the nested table.I will be trying the 'set enable_seqscan = false' solution to see if that'll improve. 		 	   		  

You evidently already do have that turned off.  I'd suggest reverting
that change (ie, allow seqscan) and instead increase work_mem enough
so that the hash join can work without spilling to disk.  This query
is a perfect example of where indexes do not help, and trying to force
them to be used makes things slower not faster.

			regards, tom lane

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