Re: Performance (was: The New Slashdot Setup (includes MySql server))

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Michael A(dot) Olson" <mao(at)sleepycat(dot)com>, Matthias Urlichs <smurf(at)noris(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Performance (was: The New Slashdot Setup (includes MySql server))
Date: 2000-05-19 16:54:10
Message-ID: 200005191654.MAA07150@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> The advantage is that you can then index a bunch more of the system
> >> catalog tables, and on a bunch more attributes. That produced some
> >> surprising speedups.
>
> > We have indexes on all system tables that need it.
>
> There isn't any fundamental reason why the planner can't be using an
> index to scan pg_index; we just need to code it that way. Right now
> it's coded as a sequential scan.
>
> Unfortunately there is no index on pg_index's indrelid column in 7.0,
> so this is not fixable without an initdb. TODO item for 7.1, I guess.

The reason there is no index is because it is not a unique column, and
at the time I was adding system indexes for 7.0, I was looking for
indexes that could be used for system cache lookups. The index you are
describing returns multiple tuples, so it would be an actual index call
in the code. i will add this to the TODO.

>
> More generally, someone should examine the other places where
> heap_getnext() loops occur, and see if any of them look like performance
> bottlenecks...

Good idea. Added to TODO.

--
Bruce Momjian | http://www.op.net/~candle
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

Browse pgsql-general by date

  From Date Subject
Next Message Michael A. Olson 2000-05-19 16:54:11 Re: Performance (was: The New Slashdot Setup (includes MySql server))
Previous Message Tom Lane 2000-05-19 16:39:17 Re: Performance (was: The New Slashdot Setup (includes MySql server))

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael A. Olson 2000-05-19 16:54:11 Re: Performance (was: The New Slashdot Setup (includes MySql server))
Previous Message Tom Lane 2000-05-19 16:39:17 Re: Performance (was: The New Slashdot Setup (includes MySql server))