Re: again on index usage

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Don Baccus <dhogaza(at)pacifier(dot)com>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, Daniel Kalchev <daniel(at)digsys(dot)bg>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: again on index usage
Date: 2002-01-11 16:42:43
Message-ID: 200201111642.g0BGghR14522@candle.pha.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Don Baccus wrote:
> Zeugswetter Andreas SB SD wrote:
>
>
> > This is one of the main problems of the current optimizer which imho rather
> > aggressively chooses seq scans over index scans. During high load this does
> > not pay off.
>
>
> Bingo ... dragging huge tables through the buffer cache via a sequential
> scan guarantees that a) the next query sequentially scanning the same
> table will have to read every block again (if the table's longer than
> available PG and OS cache) b) on a high-concurrency system other queries
> end up doing extra I/O, too.
>
> Oracle partially mitigates the second effect by refusing to trash its
> entire buffer cache on any given sequential scan. Or so I've been told
> by people who know Oracle well. A repeat of the sequential scan will
> still have to reread the entire table but that's true anyway if the
> table's at least one block longer than available cache.

That is on our TODO list, at least.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-11 16:57:27 Re: Problems with simple_heap_update and Form_pg_relcheck
Previous Message Tom Lane 2002-01-11 16:42:31 Re: why?