pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marcin Mank <marcin.mank@gmail.com>
To: Joshua Marsh <icub3d@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Performance With Joins on Large Tables
Date: Wed, 13 Sep 2006 20:39:59 +0200
Message-ID: <031701c6d764$05b0c490$0c67a8c0@maniek> (raw)
References: <38242de90609121517y62517040v8622b9ae93cba23d@mail.gmail.com>

> Is there anything I'm missing that is preventing it from using the index?
It
> just seems weird to me that other joins like this work fine and fast
> with indexes,
> but this one won't.


Did You consider clustering both tables on the dsiacctno index?

I just checked that for a 4M rows table even with enable_seqscan=on and
default *page_cost on PG 8.1.4 an index scan is being chosen for
select * from table order by serial_pkey_field


This is essentially the question in Your case - sort it, or get it sorted
via the index at the expense of more random IO.

I think clustering should work for You, but I am no expert, check with
others.

Greetings
Marcin




view thread (16+ messages)  latest in thread

Message-ID: <031701c6d764$05b0c490$0c67a8c0@maniek>
Permalink:  ../031701c6d764$05b0c490$0c67a8c0@maniek/
Also on:    postgresql.org/message-id/031701c6d764$05b0c490$0c67a8c0@maniek

 · 

reply

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: marcin.mank@gmail.com, icub3d@gmail.com
  Subject: Re: Performance With Joins on Large Tables
  In-Reply-To: <031701c6d764$05b0c490$0c67a8c0@maniek>

* 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