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: Insert date and time to a table

Re: Insert date and time to a table

From: <tedchyn_at_yahoo.com>
Date: Thu, 17 Jun 1999 13:39:18 GMT
Message-ID: <7katq4$j3k$1@nnrp1.deja.com>


y2k, 'or' in the where clause generate a union between

       where ename like 'a%'
       union
       where ename like 'A%'

table get accessed twice regardless whether index get used.

Ted
In article <37685b3d.104228953_at_news.concentric.net>,   y2000_at_pacbell.net (Y2K) wrote:
> Would there be any performance issues if I do this:
>
> select * from employee where ename like 'a%' or ename like 'A%'
>
> I mean it would still use indexes, right?
>
> Thanks for all the help guys!
>
> On Wed, 16 Jun 1999 11:18:43 GMT, ToneCzar_at_erols.com (Chris Hamilton)
> wrote:
>
> >On 15 Jun 1999 18:31:21 PDT, Y2K <y2000_at_pacbell.net> wrote:
> >
> >>Thanks for the reply!
> >>
> >>Another quick question: how do I set my Oracle database to be case
> >>insensitive?
> >>
> >>Right now if I do select * from mytable where username like 'a%',
it'll
> >>return nothing as the initial letter is capital in the username
table. I
> >>thought Oracle automatically uses case insentivitity. Where do I
set this
> >>option?
> >
> >You kind of need to choose all upper or all lower-case for your data.
> >Oracle is not case-insensitive when it comes to data. The way you
> >write a query can be case-insenstive, that is:
> >
> >SELECT empname FROM Employee;
> >
> >is the same as
> >
> >select EMPNAME from EMPLOYEE;
> >
> >But the data itself is case-sensitive, as well it should be.
> >
> >If your data looks like this:
> >
> >EMPNAME
> >-----------------
> >smith
> >jones
> >johnson
> >
> >You could query like this:
> >
> >select empname from employee where empname like 'j%'
> >or
> >select empname from employee where empname like lower(:variable)
> >but don't do
> >select empname from employee where lower(empname) like :variable
> >as this will disable the use of an index on that column for that
> >query.
> >
> >In Oracle 8i, I understand you can build function-based indexes, so
> >you could therefore index the empname column to be lower(empname) and
> >solve some of your woes!
> >
> >Chris
> >You can
> >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >Christopher Hamilton
> >Oracle DBA -- Wall Street Sports
> >chris_at_wallstreetsports.com
> >http://www.wallstreetsports.com/
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Jun 17 1999 - 08:39:18 CDT

Original text of this message

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