On Fri, 2002-11-29 at 13:22, Tom Lane wrote:
> Mike Benoit <[EMAIL PROTECTED]> writes:
> > I'm just curious, will your proposed in/exists optimizations help for
> > queries like:
>
> > db=# explain delete from dns_expired_domains where domain_id in (select
> > domain_id from dns_expired_domains gr
Mike Benoit <[EMAIL PROTECTED]> writes:
> I'm just curious, will your proposed in/exists optimizations help for
> queries like:
> db=# explain delete from dns_expired_domains where domain_id in (select
> domain_id from dns_expired_domains group by domain_id having count(*)=14
> );
Probably, but I
Tom,
I'm just curious, will your proposed in/exists optimizations help for
queries like:
db=# explain delete from dns_expired_domains where domain_id in (select
domain_id from dns_expired_domains group by domain_id having count(*)=14
);
NOTICE: QUERY PLAN:
Seq Scan on dns_expired_domains (cost
This sounds like one of those classic optimizer problems we have had to
deal with in the past. I suggest you go through the optimizer pass and
set a boolean in Query whenever you do something that may require
another loop through, then at the end, you check the boolean and loop if
required.
I th
I've been thinking about how to convert "x IN (subselect)" and EXISTS
constructs into join-like processing, and I've run into a small problem
in getting the planner to do it nicely. The issue is that I need to
take the subselect and push it into the jointree --- essentially, make
it look like a su