Subject | Re: [firebird-support] Re: Performance of Firebird vs. other DBMS |
---|---|
Author | Ivan Prenosil |
Post date | 2005-08-17T13:51:35Z |
> I seem to have overacted. I guess it just does not look pretty to me.You are right that it is not nice because it is not built-in solution - you have to
> But you take what you get.
>
> > Also, what inconsistencies do you have in mind ?
>
> Every now and then you will have to "reorganize" the counter table,
> summing up all the +1 and -1 values, else the performance will
> become as bad as that of the 'select count(*)'.
> If you do not lock out all other transactions while you do that,
> you might end up with wrong counts.
> It is an additional maintenance task.
manually create table+triggers and do maintenance.
But the table and triggers are created only once, together with other metadata,
and its maintenance can be done together e.g. with your regular backups,
just call isql that executes single stored procedure.
With default transaction isolation level you can't get wrong counts with this method.
(If you are concerned about consistency you do not use Read Commited anyway, right?)
And you do not have to lock anything.
Ivan
http://www.volny.cz/iprenosil/interbase/