From: Jeffrey Baker <jwbaker@gmail.com>
To: kevin kempter <kevin@kevinkempterllc.com>
To: pgsql-performance@postgresql.org
Subject: Re: seq scan issue...
Date: Thu, 17 Apr 2008 11:30:15 -0700
Message-ID: <fd145f7d0804171130g6549ace3u14876385420f8c11@mail.gmail.com> (raw)
In-Reply-To: <EAC52C54-0EB7-4823-BAEE-5326C773974D@kevinkempterllc.com>
References: <EAC52C54-0EB7-4823-BAEE-5326C773974D@kevinkempterllc.com>
On Thu, Apr 17, 2008 at 11:24 AM, kevin kempter
<kevin@kevinkempterllc.com> wrote:
> Hi List;
>
> I have a large tble (playback_device) with 6million rows in it. The
> aff_id_tmp1 table has 600,000 rows.
> - why am I still getting a seq scan ?
>
You're selecting almost all the rows in the product of aff_id_tmp1 *
playback_fragment. A sequential scan will be far faster than an index
scan. You can prove this to yourself using 'set enable_seqscan to
false' and running the query again. It should be much slower.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: jwbaker@gmail.com, kevin@kevinkempterllc.com
Subject: Re: seq scan issue...
In-Reply-To: <fd145f7d0804171130g6549ace3u14876385420f8c11@mail.gmail.com>
References: <EAC52C54-0EB7-4823-BAEE-5326C773974D@kevinkempterllc.com> <fd145f7d0804171130g6549ace3u14876385420f8c11@mail.gmail.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