Re: [PERFORM] Nested loop performance

2003-12-17 Thread Nick Fankhauser
> As a question, what does explain analyze give you if you > set enable_nestloop=false; before trying the query? Here are the results- It looks quite a bit more painful than the other plan, although the wall time is in the same ballpark. alpha=# explain analyze alpha-# select alpha-# min(a

Re: [PERFORM] Nested loop performance

2003-12-17 Thread Nick Fankhauser
> It seems that your basic problem is that you're fetching lots of rows > from two big ol' tables. > It doesn't seem to me that there would be a substantially better plan > for this query with your tables as they stand. That's more or less the conclusion I had come to. I was just hoping someone e

Re: [PERFORM] Nested loop performance

2003-12-16 Thread Stephan Szabo
On Tue, 16 Dec 2003, Nick Fankhauser wrote: > Is there a more efficient means than a nested loop to handle such a join? > Would a different method be chosen if there was exactly one row in > actor_summary for every row in actor? As a question, what does explain analyze give you if you set enable

Re: [PERFORM] Nested loop performance

2003-12-16 Thread Richard Poole
On Tue, Dec 16, 2003 at 12:11:59PM -0500, Nick Fankhauser wrote: > > I'm trying to optimize a query that I *think* should run very fast. > Essentially, I'm joining two tables that have very selective indexes and > constraining the query on an indexed field. (There's a third small lookup > table in

[PERFORM] Nested loop performance

2003-12-16 Thread Nick Fankhauser
Hi- I'm trying to optimize a query that I *think* should run very fast. Essentially, I'm joining two tables that have very selective indexes and constraining the query on an indexed field. (There's a third small lookup table in the mix, but it doesn't really affect the bottom line.) actor is a ta