Re: quick question abt pg_dump and restore

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Josh Harrison <joshques(at)gmail(dot)com>
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: quick question abt pg_dump and restore
Date: 2008-01-09 15:27:50
Message-ID: 20080109152750.GD4651@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Josh Harrison escribió:

> Another quick question...When you issue a query like this
> select * from dummy limit 10
> What 10 rows are fetched? like first 10 or last 10 or the first 10 from
> first block or.... ?

Any 10. (First 10 in the physical table _if_ a seqscan is used).

> And this query always returns the same 10 rows (when there are no
> updates/deletes)

Yes, assuming there is no VACUUM or CLUSTER either. And no inserts
either if there is free space on the first pages.

You really shouldn't trust it.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Schwarzer 2008-01-09 15:33:25 Installation problem: failed to initialize lc_messages to ""
Previous Message Albe Laurenz 2008-01-09 15:23:50 Re: Insert waiting for update?