Re: Suggestion for optimization

From: Doug McNaught <doug(at)wireboard(dot)com>
To: "Dann Corbit" <DCorbit(at)connx(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suggestion for optimization
Date: 2002-04-05 19:55:07
Message-ID: m3k7rlzzs4.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Dann Corbit" <DCorbit(at)connx(dot)com> writes:

> How would this work with MVCC?
> >>
> Whenever a commit occurs, the pending inserts are totaled into the sum
> and the pending deletes are subtracted. It can be a list in memory or
> whatever. Maybe you are referring to the old (expired) rows begin
> stored until vacuum? Perhaps I really don't understand your question or
> the issues involved. Why does MVCC complicate issues?
> <<

Because the row count depends on what transactions have committed when
yours starts. Also, you will see the count(*) reflecting INSERTs in
your transaction, but others won't until you commit. So there is no
well-defined concept of cardinality under MVCC--it depends on which
rows are visible to which transactions.

-Doug
--
Doug McNaught Wireboard Industries http://www.wireboard.com/

Custom software development, systems and network consulting.
Java PostgreSQL Enhydra Python Zope Perl Apache Linux BSD...

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2002-04-05 20:08:11 Re: Suggestion for optimization
Previous Message Tom Lane 2002-04-05 19:51:41 Re: Suggestion for optimization