X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D329D9DCC9E for ; Thu, 15 Dec 2005 22:21:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32446-10 for ; Thu, 15 Dec 2005 22:21:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moonunit2.moonview.localnet (wsip-68-15-5-150.sd.sd.cox.net [68.15.5.150]) by postgresql.org (Postfix) with ESMTP id 9E2E79DCCC8 for ; Thu, 15 Dec 2005 22:21:27 -0400 (AST) Received: from [192.168.0.3] (moonunit3.moonview.localnet [192.168.0.3]) by moonunit2.moonview.localnet (8.13.1/8.13.1) with ESMTP id jBG2LhKN025528 for ; Thu, 15 Dec 2005 18:21:43 -0800 Message-ID: <43A223E1.5040903@modgraph-usa.com> Date: Thu, 15 Dec 2005 18:18:09 -0800 From: "Craig A. James" User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Overriding the optimizer References: <200512141603.52583.blargity@gmail.com> <7484.1134600423@sss.pgh.pa.us> <1134629567.14248.27.camel@firebolt> <200512150148.16125.blargity@gmail.com> <1134644526.14248.60.camel@firebolt> <43A1C40D.8040006@paradise.net.nz> <43A1F6DB.3080805@modgraph-usa.com> <43A21D74.8030002@familyhealth.com.au> In-Reply-To: <43A21D74.8030002@familyhealth.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.047 required=5 tests=[AWL=0.047] X-Spam-Score: 0.047 X-Spam-Level: X-Archive-Number: 200512/367 X-Sequence-Number: 16188 Christopher Kings-Lynne wrote: >> 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) Thanks, but myfunc() takes parameters (shown here as "foo, bar"), one of which is not a column, it's external and changes with every query. A function index won't work. Craig