Re: pg_index.isclustered can work
От | Bruce Momjian |
---|---|
Тема | Re: pg_index.isclustered can work |
Дата | |
Msg-id | 200105150251.f4F2pDj12108@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: pg_index.isclustered can work (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
> Bruce Momjian <pgman@candle.pha.pa.us> writes: > > I can easily have pg_index.indisclustered updated to 'true' if you ever > > CLUSTER the index. Is that useful to anyone? Remember, clustering > > doesn't remain if you modify the table. > > I don't see any value in it as long as CLUSTER is in the disreputable > shape it's in. I don't really like giving people the impression that > CLUSTER is a supported operation ;-) OK, I have an idea! 1) Set pg_index.indisclustered during CLUSTER 2) Clear pg_index.indisclustered during vacuum if any tuples are expired 3) or, have vacuum auto-CLUSTER the table as part of vacuum 4) Use pg_index.indisclustered in the optimizer Of course, this assumes we have all the CLUSTER problems fixed. FYI, we now have a CLUSTER section in the TODO list which says: * CLUSTER * cluster all tables at once * prevent lose of indexes, permissions, inheritance * Automaticallykeep clustering on a table * Keep statistics about clustering, perhaps during VACUUM ANALYZE [optimizer] Doesn't look too bad. FYI, the reference to pg_index.indisclustered in ODBC was assuming it meant it was a hash index, which is just plain wrong, so that code is not coming back. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: