Re: count(*) optimization
От
Nikola Ivacic
Тема
Re: count(*) optimization
Дата
Msg-id
02b301c2b731$25d82d00$1100a8c0@rspi
Список
Дерево обсуждения
Re: count(*) optimization "Nikola Ivacic" <nikola@rs-pi.com>
Re: count(*) optimization "Josh Berkus" <josh@agliodbs.com>
The problem is in other software I use, witch uses count(*) function to display relation properties pgAdmin II phpPgAdmin Nikola ----- Original Message ----- From: "Bruno Wolff III" To: "Nikola Ivacic" Cc: Sent: Wednesday, January 08, 2003 5:22 PM Subject: Re: [SQL] count(*) optimization > On Wed, Jan 08, 2003 at 17:04:40 +0100, > Nikola Ivacic wrote: > > Hi > > > > I have trouble executing count(*) statement. > > On a large dataset it takes quite a while to return result. > > Is there any other way to get number of tupples in relation > > or is the only way to optimize count() function to index it? > > Indexes won't help count. > > If you retrieve counts a lot more than you do updates that will change their > value, then you may want to keep the counts in another table and use > triggers to keep them updated. >
В списке pgsql-sql по дате отправления