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

Re: Two queries are better than one?

From: Karim Nassar <karim(dot)nassar(at)acm(dot)org>
To: Gnanavel S <s(dot)gnanavel(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Two queries are better than one?
Date: 2005-07-29 04:21:38
Message-ID: 1122610899.11862.63.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-performance
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(dot)nassar(at)acm(dot)org>


In response to

Responses

pgsql-performance by date

Next:From: Neil ConwayDate: 2005-07-29 04:26:29
Subject: Re: Left joining against two empty tables makes a query
Previous:From: Gnanavel SDate: 2005-07-29 04:11:31
Subject: Re: Two queries are better than one?

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