From: Dave Dutcher <dave@tridecap.com>
To: 'tmp' <skrald@amossen.dk>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query only slow on first run
Date: Wed, 28 Nov 2007 10:00:05 -0600
Message-ID: <05e801c831d7$bea1bee0$8e00a8c0@tridecap.com> (raw)
In-Reply-To: <474CBF98.6070508@amossen.dk>
References: <fihgt1$1mmh$1@news.hub.org>
<20071127165543.GY11978@crankycanuck.ca>
<23999.1196184368@sss.pgh.pa.us>
<fihn7h$2jrn$1@news.hub.org>
<056501c83128$55d58a90$8e00a8c0@tridecap.com>
<fii71p$oc1$1@news.hub.org>
<20071127233833.GA24031@uio.no>
<15029.1196209554@sss.pgh.pa.us>
<474CBF98.6070508@amossen.dk>
> -----Original Message-----
> From: tmp
> We have primarily two tables of interest here: questions
> (~100k rows) and posts (~400k rows). Each post refers to a
> question, but only the "posts" rows for which the
> corresponding "question.status = 1" are relevant. This
> reduces the number of relevant question rows to about 10k.
Earlier you said only a small subset of questions have a status of 1, so I
assumed you meant like 100 not 10k :) According to the explain analyze
there are only 646 rows in posts which match your criteria, so it does seem
like scanning posts first might be the right thing to do.
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: dave@tridecap.com, skrald@amossen.dk
Subject: Re: Query only slow on first run
In-Reply-To: <05e801c831d7$bea1bee0$8e00a8c0@tridecap.com>
* 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