From: Decibel! <decibel@decibel.org>
To: Craig James <craig_james@emolecules.com>
Cc: pgsql-perform@postgresql.org
Subject: Re: RES: RES: select on 1milion register = 6s
Date: Mon, 30 Jul 2007 01:52:41 -0500
Message-ID: <20070730065241.GR25704@decibel.org> (raw)
In-Reply-To: <46AD6B34.8090200@emolecules.com>
References: <20070729163536.GM25704@nasby.net>
<005b01c7d1ff$b96ea3d0$e900a8c0@brunolaptop>
<20070730012926.GP25704@nasby.net>
<46AD6B34.8090200@emolecules.com>
Please reply-all so others can learn and contribute.
On Sun, Jul 29, 2007 at 09:38:12PM -0700, Craig James wrote:
> Decibel! wrote:
> >It's unlikely that it's going to be faster to index scan 2.3M rows than
> >to sequential scan them. Try setting enable_seqscan=false and see if it
> >is or not.
>
> Out of curiosity ... Doesn't that depend on the table? Are all of the data
> for one row stored contiguously, or are the data stored column-wise? If
> it's the former, and the table has hundreds of columns, or a few columns
> with large text strings, then wouldn't the time for a sequential scan
> depend not on the number of rows, but rather the total amount of data?
Yes, the time for a seqscan is mostly dependent on table size and not
the number of rows. But the number of rows plays a very large role in
the cost of an indexscan.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: decibel@decibel.org, craig_james@emolecules.com, pgsql-perform@postgresql.org
Subject: Re: RES: RES: select on 1milion register = 6s
In-Reply-To: <20070730065241.GR25704@decibel.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox