Re: sequential scans on few columns tables

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: sequential scans on few columns tables
Date: 2003-06-16 22:45:27
Message-ID: 20030616224527.GM40542@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jun 16, 2003 at 09:49:40PM +0200, Tomasz Myrta wrote:
> by denormalizing tables. Let's say we have table "users" which we split
> into 1:1 relation "users_header" and "users_data". We put searchable
> columns into users_header and rest of them into users_data. users_data
> have some integer foreign key referencing to users_header.
>
> What do you think about it? Does the Postgres use advantages of small
> table users_header? Sequential scan on memory cached table should speed
> up queries, the rest columns are in integer-indexed table which
> shouldn't slow it down.

Keep in mind that pgsql has a pretty heafty per-row overhead of 23
bytes. If your data table has a bunch of big varchars then it might be
worth it, otherwise it might not be.
--
Jim C. Nasby (aka Decibel!) jim(at)nasby(dot)net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ernest E Vogelsinger 2003-06-16 22:46:54 Interesting incosistent query timing
Previous Message Jim C. Nasby 2003-06-16 22:41:05 Re: left join performance problem