Re: Poor Query

From: Pallav Kalva <pkalva(at)deg(dot)cc>
To: Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Poor Query
Date: 2004-12-06 15:52:51
Message-ID: 41B48053.7090805@deg.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Pierre-Frédéric Caillaud wrote:

>
> How many rows do the following queries return :
>
> select userID
> from bankaccount ba
> where ba.bankaccountID = u.bankaccountID
> and ba.accountnumber = '12345678'
>
> select userID
> from bankaccount ba
> where ba.bankaccountID = u.bankaccountID
> and ba.routingNumber = '12345678'
>
> Can you post EXPLAIN ANALYZE for these two queries ?
> Regards.
>
Thanks! for the quick reply. It should usually return just one account
for that user so its only one record. Actually userid column doesnt
exist on bankaccount table it exists only on the user table and it is
joined with bankaccountid column, if i run this query separately i
wouldnt able to run it .

In response to

Responses

  • Re: Poor Query at 2004-12-06 16:16:10 from Pierre-Frédéric Caillaud

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-12-06 15:56:01 Re: Config Check
Previous Message Pierre-Frédéric Caillaud 2004-12-06 15:48:05 Re: Poor Query