From: Robert Klemme <shortcutter@googlemail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Advice on optimizing select/index
Date: Sun, 26 May 2013 14:34:10 +0200
Message-ID: <knsvg4$ldg$1@ger.gmane.org> (raw)
In-Reply-To: <39DB3954-1DDF-4551-B794-E65AF48F2C96@autouncle.com>
References: <39DB3954-1DDF-4551-B794-E65AF48F2C96@autouncle.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 22.05.2013 16:37, Niels Kristian Schjødt wrote:
> In reality the adverts that are selected is all 'active'. I'm hence
> wondering if it theoretically (and in reality of cause) would make my
> query faster if I did something like: "SELECT .* FROM cars LEFT
> OUTER JOIN adverts on cars.id = adverts.car_id WHERE cars.brand =
> 'Audi' AND adverts.state = 'active'" with a partial index on "INDEX
> adverts ON (car_id) WHERE state = 'active'"?
That sounds reasonable to do. If you have enough bandwidth on your
production database why not just try it out? Otherwise you could do
this on a test database and see how it goes and what plan you get. Btw.
did you look at the original plan?
Cheers
robert
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: shortcutter@googlemail.com
Subject: Re: Advice on optimizing select/index
In-Reply-To: <knsvg4$ldg$1@ger.gmane.org>
* 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