Re: Indices for select count(*)? - Mailing list pgsql-general

From Jaime Casanova
Subject Re: Indices for select count(*)?
Date
Msg-id c2d9e70e0512220830w554f3563g71321806ac00b58c@mail.gmail.com
Whole thread Raw
In response to Re: Indices for select count(*)?  (Scott Marlowe <smarlowe@g2switchworks.com>)
Responses Re: Indices for select count(*)?
List 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 by date:

Previous
From: Ed Loehr
Date:
Subject: Re: two shared memory segments?
Next
From: Bruce Momjian
Date:
Subject: Re: About Maximum number of columns