Re: Strange count(*) implementation?

From: Henk Ernst Blok <h(dot)e(dot)blok(at)utwente(dot)nl>
To: Tino Wildenhain <tino(at)wildenhain(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange count(*) implementation?
Date: 2004-10-26 14:58:46
Message-ID: 417E6626.60907@utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tino,

Thanks for the sugestion about exploiting the rules system. I hadn't
thought about that option yet. Currently I'm trying to pre-compute as
much as possible.

Regards,

Henk Ernst

Tino Wildenhain wrote:

>Hi,
>
>On Tue, 2004-10-26 at 15:25, Henk Ernst Blok wrote:
>...
>
>
>
>>the TPC-H query set in particular). So decision support and datamining
>>are in that area for instance. My topic of interest is IR (information
>>retrieval) in a database context. My experiments behave like an OLAP
>>load at the moment. My current experiments involve a lot of counting
>>and expensive joins as I have to compute certain estimators in a
>>mathematical model I'm working on, hence the importance of the
>>count... ;)
>>On MySQL each of the 30 queries I have to run took on average about 24
>>h. As my queries are getting even complexer I'm now trying to find out
>>whether Postgres can do a better job.
>>
>>
>
>In your specific application if you have not many inserts
>or have a phase where you do the inserts and another distinct
>phase where you do the analysis, you should be able to
>count() just before your analysis. If not you can always
>experiment with triggers to count() in an optimized way
>using just another table to store the count value
>for every table you need.
>
>INSERT/DELETE via function, use a trigger and/or RULES.
>This should do the trick.
>Maybe you can precalculate a lot more - depending on
>the algorithms you use.
>
>Regards
>Tino
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>

--
address: DB group, Computer Science, EEMCS Dept., University of Twente,
PO Box 217, 7500 AE, ENSCHEDE, THE NETHERLANDS
phone: ++31 (0)53 489 3754 (if no response: 3690)
email: h(dot)e(dot)blok(at)utwente(dot)nl
WWW: http://www.cs.utwente.nl/~blokh

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Henk Ernst Blok 2004-10-26 15:04:22 Re: Strange count(*) implementation?
Previous Message Stephan Szabo 2004-10-26 14:55:17 Re: Any plans on allowing user-defined triggers to be