pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: Pallav Kalva <pkalva@deg.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: Poor Query
Date: Mon, 06 Dec 2004 17:16:10 +0100
Message-ID: <opsilgs8b4cq72hf@musicbox> (raw)
In-Reply-To: <41B48053.7090805@deg.cc>
References: <41B47A97.1090708@deg.cc>
	<opsilfifducq72hf@musicbox>
	<41B48053.7090805@deg.cc>



	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 ?
>>
>> 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 .
>
>






view thread (9+ messages)  latest in thread

Message-ID: <opsilgs8b4cq72hf@musicbox>
Permalink:  ../opsilgs8b4cq72hf@musicbox/
Also on:    postgresql.org/message-id/opsilgs8b4cq72hf@musicbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: lists@boutiquenumerique.com, pkalva@deg.cc
  Subject: Re: Poor Query
  In-Reply-To: <opsilgs8b4cq72hf@musicbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox