Re: Overriding the optimizer

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Overriding the optimizer
Date: 2005-12-16 02:02:35
Message-ID: 43A2203B.2050102@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>> select * from my_table where row_num >= 50000 and row_num < 100000
>>> and myfunc(foo, bar);
>>
>>You just create an index on myfunc(foo, bar)
>
> only if myfunc(foo, bar) is immutable...

And if it's not then the best any database can do is to index scan
row_num - so still you have no problem.

Chris

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig A. James 2005-12-16 02:16:08 Re: Overriding the optimizer
Previous Message Jaime Casanova 2005-12-16 02:00:44 Re: Overriding the optimizer