Re: [GENERAL] Fast join

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Leon <leon(at)udmnet(dot)ru>, "'pgsql-general(at)hub(dot)org'" <pgsql-general(at)hub(dot)org>
Subject: Re: [GENERAL] Fast join
Date: 1999-06-29 15:53:05
Message-ID: l03130302b39e9bdfbcf8@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 18:33 +0300 on 29/06/1999, Leon wrote:

> adb=> EXPLAIN SELECT COUNT(*) FROM atable WHERE atable.cfield =
>btable.cfield
> AND atable.afield<10;
...
>
> adb=> EXPLAIN SELECT COUNT(*) FROM atable WHERE atable.cfield =
>btable.cfield
> AND atable.afield>100;

Hey, shouldn't these be:

SELECT COUNT(*)
FROM atable, btable <----- Note this!
WHERE atable.cfield = btable.cfield
AND ....

I'm not sure that when the other table is implicit, the optimizer checks
the statistics of the btable on time.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1999-06-29 16:01:57 Re: [GENERAL] Fast join
Previous Message Leon 1999-06-29 15:33:41 Re: [GENERAL] Fast join