From: | mlw <markw(at)mohawksoft(dot)com> |
---|---|
To: | Curt Sampson <cjs(at)cynic(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Michael Loftis <mloftis(at)wgops(dot)com> |
Subject: | Re: Index Scans become Seq Scans after VACUUM ANALYSE |
Date: | 2002-04-24 03:02:26 |
Message-ID: | 3CC62042.B00A70A1@mohawksoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Curt Sampson wrote:
>
> On Thu, 18 Apr 2002, Michael Loftis wrote:
>
> > mlw wrote:
> >
> > >The supposed advantage of a sequential read over an random read, in
> > >an active multitasking system, is a myth. If you are executing one
> > >query and the system is doing only that query, you may be right.
> > >
> > >Execute a number of queries at the same time, the expected benefit
> > >of a sequential scan goes out the window. The OS will be fetching
> > >blocks, more or less, at random.
>
> On a system that has neither read-ahead nor sorting of I/O requests,
> yes. Which systems are you using that provide neither of these
> facilities?
This only happens if the OS can organize the I/O requests in such a manner. It
is a non-trivial function.
>
> > In a multi-tasking system it's always cheaper to fetch less blocks, no
> > matter where they are. Because, as you said, it will end up more or
> > less random onf a system experiencing a larger number of queries.
>
> Invariably a process or thread will lose its quantum when it submits
> an I/O request. (There's nothing left for it to do, since it's waiting
> for its data to be read, so there's nothing for it to execute.)
This statement is verifiably false. What a program does after it submits an I/O
requests is VERY OS and state specific. If an I/O request is made for a disk
block, which is in read-ahead cache, a number of operating systems my return
right away.
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2002-04-24 03:12:15 | Re: namedatalen part 2 (cont'd) |
Previous Message | mlw | 2002-04-24 02:50:43 | Re: Index Scans become Seq Scans after VACUUM ANALYSE |