Re: Query palns and tug-of-war with enable_sort

From: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query palns and tug-of-war with enable_sort
Date: 2009-02-19 16:23:24
Message-ID: 287546.44385.qm@web23604.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- On Thu, 19/2/09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Also, it'd be worth revisiting the question of whether
> you really still
> need enable_sort off ... personally, I'd think that
> reducing
> random_page_cost is a much saner way of nudging the planner
> in the
> direction of preferring indexscans.
>

We have relatively quick storage and most of our data fits in ram, so I've dropped random_page_cost a little more and at some point I'll flick enable_sort back on and see how it goes.

> BTW, it might be a bit late for this, but you'd be a
> lot better off
> performance-wise with bigint join keys instead of
> numeric(8,0).
> Numeric is slow, and at that field width it's not
> buying you anything at
> all.
>

This may be a little out of my control, there's a lot of things wrong with how our tables are set up and I generally have to swim through lots of 20+ year old code to discover how changes will affect it. That said there's a lot of these numeric(8,0) fields and I doubt switching them for bigint would cause any problems.

Thanks Tom.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message SHARMILA JOTHIRAJAH 2009-02-19 16:37:38 How to pipe the psql copy command to Unix 'Date' command
Previous Message John R Pierce 2009-02-19 16:09:23 Re: postgres wish list