Re: [PERFORM] Inefficient queryplan for query with intersectable

2005-08-28 Thread Arjen van der Meijden
On 27-8-2005 16:27, Tom Lane wrote: Arjen van der Meijden <[EMAIL PROTECTED]> writes: Is a nested loop normally so much (3x) more costly than a hash join? Or is it just this query that gets estimated wronly? There's been some discussion that we are overestimating the cost of nestloops in gene

Re: [PERFORM] Inefficient queryplan for query with intersectable

2005-08-27 Thread Tom Lane
Arjen van der Meijden <[EMAIL PROTECTED]> writes: > But appareantly there is a bug in the explain mechanism of the 8.1devel > I'm using (I downloaded a nightly 25 august somewhere in the morning > (CEST)), since it returned: > ERROR: bogus varno: 9 Yeah, someone else sent in a test case for thi

Re: [PERFORM] Inefficient queryplan for query with intersectable

2005-08-27 Thread Arjen van der Meijden
On 27-8-2005 0:56, Tom Lane wrote: Arjen van der Meijden <[EMAIL PROTECTED]> writes: As said, it chooses sequential scans or "the wrong index plans" over a perfectly good plan that is just not selected when the parameters are "too well tuned" or sequential scanning of the table is allowed.

Re: [PERFORM] Inefficient queryplan for query with intersectable

2005-08-26 Thread Tom Lane
Arjen van der Meijden <[EMAIL PROTECTED]> writes: > As said, it chooses sequential scans or "the wrong index plans" over a > perfectly good plan that is just not selected when the parameters are > "too well tuned" or sequential scanning of the table is allowed. I think some part of the problem c

Re: [PERFORM] Inefficient queryplan for query with intersectable

2005-08-26 Thread Arjen van der Meijden
On 26-8-2005 15:05, Richard Huxton wrote: Arjen van der Meijden wrote: I left all the configuration-stuff to the defaults since changing values didn't seem to impact much. Apart from the buffers and effective cache, increasing those made the performance worse. I've not looked at the rest

Re: [PERFORM] Inefficient queryplan for query with intersectable

2005-08-26 Thread Richard Huxton
Arjen van der Meijden wrote: I left all the configuration-stuff to the defaults since changing values didn't seem to impact much. Apart from the buffers and effective cache, increasing those made the performance worse. I've not looked at the rest of your problem in detail, but using the def

[PERFORM] Inefficient queryplan for query with intersectable subselects/joins

2005-08-26 Thread Arjen van der Meijden
Hi list, I'm writing an application that will aggregate records with a few million records into averages/sums/minimums etc grouped per day. Clients can add filters and do lots of customization on what they want to see. And I've to translate that to one or more queries. Basically, I append ea