Re: Indices for select count(*)?

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: Indices for select count(*)?
Дата
Msg-id c2d9e70e0512220830w554f3563g71321806ac00b58c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Indices for select count(*)?  (Scott Marlowe <smarlowe@g2switchworks.com>)
Ответы Re: Indices for select count(*)?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
>
> I wouldn't mind a "with visibility" switch for indexes that you could
> throw when creating them for this purpose.  But burdening all indexes
> with this overhead when most wouldn't need it is not, IMHO, a good idea.
>

that would add complexity to the index code for... just one case?

what about a set of functions instead...

one function to create all necesary triggers  to maintain a different
table with a count for the table, and one function that retrieves that
info

select start_counter_on_table('table_name');
select get_counter_on_table('table_name');

of course, this could be usefull just for the case of "select * from
table"... but that case is the whole problem...

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

В списке pgsql-general по дате отправления:

Предыдущее
От: Ed Loehr
Дата:
Сообщение: Re: two shared memory segments?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: About Maximum number of columns