Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Optimizer fails?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: mimo(at)interdata(dot)com(dot)pl (Michal Mosiewicz)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Optimizer fails?
Date: 1998-03-25 05:33:15
Message-ID: 199803250533.AAA26799@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
> Seq Scan on log  (cost=105832.15 size=699588 width=62)
> 
> There is an index on log table, dt field. The index is b-tree.
> However it doesn't seem to be used. (Of course I have vacuumed it). The
> table has about 2M records. I don't think that Seq Scan is a good idea.
> 
> Also, what if I agregate it on dt field to count(*) or sum some values.
> It would be sequentially scanned, then sorted, then grouped and finally
> agregated, right?

I assume you have vacuum analyze too?  It may help.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

In response to

pgsql-hackers by date

Next:From: David GouldDate: 1998-03-25 05:48:59
Subject: Re: [HACKERS] Optimizer fails?
Previous:From: Vadim B. MikheevDate: 1998-03-25 03:43:44
Subject: Re: AW: [HACKERS] Begin statement again

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group