Re: Suggestion for optimization

From: Peter Bierman <bierman(at)apple(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 21:01:38
Message-ID: v03130301b8d3bfb83d00@[17.202.21.231]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 12:08 PM -0800 4/5/02, Dann Corbit wrote:
>I guess that this model can be viewed as "everything is a snapshot".
>It seems plain that the repercussions for a data warehouse and for
>reporting have not been thought out very well. This is definitely
>very, very bad in that arena. I suppose that reporting could still
>be accomplished, but it would require pumping the data into a new
>copy of the database that does not allow writes at all. Yuck.

That is exactly the point of MVCC. When you start your reporting cycle, you initiate a transaction. That transaction causes the database to _act_ as if you had "pump[ed] the data into a new copy of the database that does not allow writes at all."

Your transaction is isolated from ongoing activities in the database. Your transaction _is_ a snapshot of the database at some instant in time.

This is a good thing. You should probably ponder it for a while before claiming it hasn't been thought out well wrt. certain applications.

Still, your suggestion _could_ be implemented. Your comment: "An accurate
cardinality figure can greatly enhance the optimizer's ability to
perform joins in the correct order" was intriguing, and I'd be interested in Tom's thoughts on just that bit.

-pmb

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2002-04-05 21:04:34 Re: Suggestion for optimization
Previous Message Dann Corbit 2002-04-05 20:53:49 Re: Suggestion for optimization