pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karim Nassar <karim.nassar@acm.org>
To: Gnanavel S <s.gnanavel@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Two queries are better than one?
Date: Thu, 28 Jul 2005 21:21:38 -0700
Message-ID: <1122610899.11862.63.camel@localhost.localdomain> (raw)
In-Reply-To: <eec3b03c050728211116bafdab@mail.gmail.com>
References: <1122591866.11860.11.camel@localhost.localdomain>
	<eec3b03c050728211116bafdab@mail.gmail.com>

On Fri, 2005-07-29 at 09:41 +0530, Gnanavel S wrote:

>         
>         Joined:
>         
>         test=> explain analyze
>         test->    SELECT cli_name,order.*
>         test->               FROM order 
>         test->               JOIN client ON (ord_client = cli_code)
>         test->              WHERE ord_batch='343B' AND
>         ord_id='12-645';
> 
> where is the cli_code condition in the above query?

I don't understand the question. ord_client is the client code, and
cli_code is the client code, for their respective tables. batch/id is
unique, so there is only one record from order, and only one client to
associate.

Clearer?

-- 
Karim Nassar <karim.nassar@acm.org>




view thread (7+ messages)  latest in thread

Message-ID: <1122610899.11862.63.camel@localhost.localdomain>
Permalink:  ../1122610899.11862.63.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1122610899.11862.63.camel@localhost.localdomain

 · 

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: karim.nassar@acm.org, s.gnanavel@gmail.com
  Subject: Re: Two queries are better than one?
  In-Reply-To: <1122610899.11862.63.camel@localhost.localdomain>

* 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