Re: [GENERAL] somewhat slow query with subselect

2009-08-25 Thread Marcus Engene
Tom Lane wrote: Marcus Engene writes: ... In a case with some 5000 rows belonging to owner 123, this select really takes a long time. Way longer than without the subselect and order by filelength. I agree that with the subselect it would take some extra juice, but in my mind it would do so

Re: [GENERAL] somewhat slow query with subselect

2009-08-25 Thread Tom Lane
Marcus Engene writes: > ... In a case with some 5000 rows belonging to owner 123, this select really > takes a long time. Way longer than without the subselect and order by > filelength. I agree that with the subselect it would take some extra > juice, but in my mind it would do some hash in me

[GENERAL] somewhat slow query with subselect

2009-08-25 Thread Marcus Engene
Hi list, I have a table, not that many rows (400k) but with about 55 columns. There are some maintenance selects I want to do (every now and then) that I don't want to add indexes for. select ... from quite_big_table qbt where qbt.owner = 123 AND exists ( select null