Re: ORDER BY user defined function performance issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nick Trainor <nick(dot)trainor(at)trainorthornton(dot)co(dot)uk>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: ORDER BY user defined function performance issues
Date: 2004-06-11 17:59:42
Message-ID: 16729.1086976782@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Nick Trainor <nick(dot)trainor(at)trainorthornton(dot)co(dot)uk> writes:
> What am I missing here?

The ORDER BY query has to evaluate the function at *every* row of the
table before it can sort. The other query was only evaluating the
function at twenty rows.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2004-06-11 18:40:00 in-transaction insert performance in 7.5devel
Previous Message Tom Lane 2004-06-11 16:05:20 Re: reindex and copy - deadlock?