| From: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: What popular, large commercial websites run | 
| Date: | 2002-05-01 23:32:43 | 
| Message-ID: | Pine.LNX.4.21.0205020029290.9945-100000@ponder.fairway2k.co.uk | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Wed, 1 May 2002 postgres(at)vrane(dot)com wrote:
> On Wed, May 01, 2002 at 11:54:37PM +0100, Nigel J. Andrews wrote:
> > 
> > On Wed, 1 May 2002 postgres(at)vrane(dot)com wrote:
> > 
> > Then run
> >    EXPLAIN ANALYZE SELECT * FROM TABLE <mytable> WHERE <booleanfield> = true;
> > 
> > Then run
> >    UPDATE <mytable> SET <booleanfield> = false WHERE <booleanfield> = false;
> > 
> > (several times)
> > 
> > What you should see is a seqscan in both plans with the final number of rows
> > the same but the second will have taken longer.
> 
> I haven't tried it yet but isn't creating an index here
> the logical thing to do here.  Whenever I have "where"
> clause in my queries I always create an index.
Damn, knew I'd miss something out. Yes, it would seem a good idea to create an
index on that boolean column. I'd still expect the second query (in the explain
analyze) to take longer to complete. I think I might give this a go myself
sometime just to check.
-- 
Nigel J. Andrews
Director
---
Logictree Systems Limited
Computer Consultants
| From | Date | Subject | |
|---|---|---|---|
| Next Message | GB Clark | 2002-05-02 00:12:22 | Re: [GENERAL] Fwd: Postfix Relay Hub SMTP server: errors from pos | 
| Previous Message | postgres | 2002-05-01 23:19:47 | Re: What popular, large commercial websites run |