Re: optimizing a cpu-heavy query

From: Joel Reymont <joelr1(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: optimizing a cpu-heavy query
Date: 2011-04-27 06:59:47
Message-ID: B7BDD4F5-48B8-4409-8174-19C299871573@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom,

On Apr 26, 2011, at 5:00 PM, Tom Lane wrote:

> For another couple orders of magnitude, convert the sub-function to C code. (I don't think you need
> a whole data type, just a function that does the scalar product.)

That's a 30x speedup, from 12 minutes down to 38s. Thanks Tom!

--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Toby Corkindale 2011-04-27 07:46:45 Re: tuning on ec2
Previous Message Toby Corkindale 2011-04-27 05:49:15 Re: Poor performance of btrfs with Postgresql