From: | Ben <bench(at)silentmedia(dot)com> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: what's going on here? |
Date: | 2001-03-09 20:41:03 |
Message-ID: | Pine.LNX.4.10.10103091238170.28803-100000@gilgamesh.eos.SilentMedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I think that's because the stream=1 query is doing a sequential scan on
files, so it has to look at everything, whereas the index scan in the
stream=2 query only looks at the important rows. (Which in this case was
just 1 row.)
I think this question is: why is one using an index scan and the other
using a sequential scan?
On Fri, 9 Mar 2001, Stephan Szabo wrote:
>
> Hmm, I also notice that it's getting very different numbers for
> rows from files as well.
>
> On Fri, 9 Mar 2001, Ben wrote:
>
> > Every night. There are 6223 rows with stream=2 and 7041 rows with
> > stream=1. At any given time, there will be between 1 to 30 rows with
> > played=null for both values.
> >
> > On Fri, 9 Mar 2001, Stephan Szabo wrote:
> >
> > >
> > > Has vacuum analyze been run on both recently? What is the maximum number
> > > of rows with a particular stream value, and how many does each of 1 and 2
> > > actually have?
> > >
> > > > Interestingly, the sequential scan on playlist claims to be returning 2000
> > > > results for stream=1 and only 200 for stream=2. I'm not sure which part of
> > > > the where clause this guess comes from, because the playlist table has
> > > > equal numbers of entries for both streams.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | drevil | 2001-03-09 21:12:55 | How to use locks, for DB noivces? |
Previous Message | Stephan Szabo | 2001-03-09 20:35:35 | Re: what's going on here? |