Search Postgresql Archives

Re: Clustering with enough work_mem: copy heap in mem?

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

 



> There was an
> attempt to fix it (for example so that it could try to do a
> seqscan+sort
> instead of indexscan), but it stalled.

Actually I read that, but it's complicated... it involves planning and a lot of other stuff I don't even know about...

My "solution" I guess would be easier (but, of course, can't be used if you don't have enough work_mem):

if heap table <= work_mem
 copy heap table in mem
 use that region as it was the real file
else
 do the regular (slow!) cluster 

I guess this can be worse than the current way of doing it only when the table contains a lot of dead rows; in all other cases I can't see how cluster could ever become faster than a simple table + index scans.

Of course, I'm not saying it's "very easy" to implement... but given the tons of ram a lot of people use in the servers, and the fact that work_mem can be set on a per-connection basis, I think it would be nice...

 




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