Skip site navigation (1) Skip section navigation (2)

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 16:37:47
Message-ID: 41B48ADB.7000100@deg.cc (view raw or flat)
Thread:
Lists: pgsql-performance
Pierre-Frédéric Caillaud wrote:

>
>
>     Just wanted to know the selectivity of the accountnumber and  
> routingNumber columns.
>     I shoulda written :
>
>>>     How many rows do the following queries return :
>>
>     One or few at most, or a lot ? 


Just One, user can i have only one bankaccount.

>
>>>
>>> select userID
>>>              from bankaccount
>>>              WHERE accountnumber = '12345678'
>>>
>>> select userID
>>>           from bankaccount
>>>           WHERE 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

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

Responses

  • Re: Poor Query at 2004-12-06 17:34:22 from Pierre-Frédéric Caillaud

pgsql-performance by date

Next:From: Josh BerkusDate: 2004-12-06 17:26:34
Subject: Processor optimization compile options?
Previous:From: Pierre-Frédéric CaillaudDate: 2004-12-06 16:16:10
Subject: Re: Poor Query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group