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

Re: Large querie with several EXISTS which will be often runned

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Bruno BAGUETTE" <pgsql-ml(at)baguette(dot)net>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: Large querie with several EXISTS which will be often runned
Date: 2003-06-27 15:41:40
Message-ID: 200306270841.40634.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
Bruno,

> I will have to manage more or less 10.000 products with more or less 2-3
> options by products and more or less 40 options-groups.
>
> Do you think that this query will be hard for PostgreSQL (currently
> 7.2.1 but I will migrate to 7.3.2 when going in production environment)
> ?
> How can I improve that query to be faster ?

Collapse the inner EXISTS into a straight join in the outer EXISTS.  Since you 
are merely checking for existence, there is no reason for the subquery 
nesting.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

pgsql-performance by date

Next:From: Patrick HatcherDate: 2003-06-27 19:09:50
Subject: Memory question
Previous:From: Bruno BAGUETTEDate: 2003-06-27 14:32:21
Subject: Large querie with several EXISTS which will be often runned

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