Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: simple sql using between startnumber and endnumber not performing

Re: simple sql using between startnumber and endnumber not performing

From: Thorsten Kettner <thorsten.kettner_at_web.de>
Date: Mon, 02 Jul 2007 04:14:28 -0700
Message-ID: <1183374868.400070.302330@57g2000hsv.googlegroups.com>


On 27 Jun., 22:19, Benjamin Sølberg <benjamin.soelb..._at_gmail.com> wrote:
> Yes the numbers are infact Strings.. actually varchar2(8)
> I would very much like to change it but its an old and huge system of
> which I only have partly control.

So it's all numbers in those strings? Then I'd make an index based on the numbers, because comparing numbers is much faster than comparing strings.

create index num_idx on my_table ( to_number(startnumber), to_number(endnumber) ) Received on Mon Jul 02 2007 - 06:14:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US