Skip site navigation (1) Skip section navigation (2)

Patch 0.2 for Re: [HACKERS] Caching number of blocks in relation to avoi lseek.

From: Denis Perchine <dyp(at)perchine(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Patch 0.2 for Re: [HACKERS] Caching number of blocks in relation to avoi lseek.
Date: 2000-06-13 08:37:58
Message-ID: 00061315411005.00525@dyp (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> If read or write fails. Position will left the same. This situation is already tracked
> in File routines, but a little bit incorrectly.

After small survey in Linux kernel code, I am not sure about it.
New patch set pos to unknown in the case of read/write fails. And do
lseek again.
 
> Here is the full patch for this. This patch reduce amount of lseek call ten times
> for update statement and twenty times for select statement. I tested joined update
> and count(*) select for table with rows > 170000 and 10 indices.
> I think this is worse of trying. Before lseek calls account for more than 5% of time.
> Now they are 0.89 and 0.15 respectevly.
> 
> Due to only one file modification patch should be applied in src/backedn/storage/file/ dir.

-- 
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp(at)perchine(dot)com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------

Attachment: fd.c.patch
Description: text/x-c (2.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Karel ZakDate: 2000-06-13 08:49:34
Subject: Re: memory management suggestion
Previous:From: Oleg BroytmannDate: 2000-06-13 08:29:41
Subject: Re: setproctitle

pgsql-patches by date

Next:From: Chris BitmeadDate: 2000-06-13 08:45:27
Subject: Re: Patch for better large objects support
Previous:From: Denis PerchineDate: 2000-06-13 08:19:52
Subject: Patch for Re: [HACKERS] Caching number of blocks in relation to avoi lseek.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group