Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 2 Oracle doubts
Hi Sybrand Bakker, thanks for writing this:
> On Fri, 25 Jul 2003 20:00:29 GMT, Karsten Farrell
> <kfarrell_at_belgariad.com> wrote:
>
> >Because I "know" my data, I
> >can put NY and IL at the beginning of the States table and find it on the
> >first couple of rows most of the time. If I made an index, they would be
> >in the middle.
>
> IMO this is just a pretty stupid approach. It means that whenever the
> order of the records inadvertently changes, your application won't
> work anymore. I can only fear how the rest of your application looks
> like when you are relying on a particular order of rows in a table.
> The comment 'If I make an index they would be in the middle' is also
> pretty nonsensical. It is quite easy to add a priority column, index
> that column also, and query according priority.
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
>
You can consider it stupid if you wish. However, you comment that it would break if the order changes is wrong. It would still find NY and IL. They would just be further down in the drop-down list.
And the whole point of my posts was to say that indexes are not always required ... so saying I can have a function-based index is a non-issue. My point was that you have to design according to your particular situation ... that rules of thumb are not the only way to look at things.
-- [:%s/Karsten Farrell/Oracle DBA/g]Received on Fri Jul 25 2003 - 15:29:23 CDT