Search Postgresql Archives

Re: How to make update rapidly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 21, 2008 at 1:07 AM, hewei <heweiweihe@xxxxxxxxx> wrote:
> Hi, Scott Marlowe:
>
> You said that " As for processing them in order versus randomly,that's a
> common problem. "
> do you know why? how postgres work in this scenario.

Pretty much the same way any database would.  it's likely that your
data in the table is in some order.  When you update one row, then the
next n rows are read into memory as well.  Updating these is cheaper
because they don't have to be read, just flushed out to the write
ahead log.  If you have very random access on a table much larger than
your shared_buffers or OS cache, then  it's likely that by the time
you get back to a row on page x it's already been flushed out of the
OS  or pg and has to be fetched again.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux