Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: WHERE NOT ...
Hi.
In ORACLE this type of query will run fast.
Also for little tables using this type of indexing is bad more preferable
to give a chance for ORACLE
to read it to cache complete.
Regards.
Pablo Colmenero wrote:
> Maybe this quesion will seem trivial for some database experts, but I
> cannot find an easy and clean solution, so I ask it.
>
> Suppose you have a table T with 3 fields A, B and C and you've got an
> index to all these fields.
> I have noticed that when you make some query like
>
> SELECT A,B,C
> FROM T
> WHERE A ="" AND
> B >"first"
> ORDER BY B,C
>
> It runs quickly, because of the index. But if in the WHERE line you
> write A<>"" instead of A="", the negated condition makes the query very
> slow.
> Right now, I run this query over an Access 97 database, but in the
> future it will run in Oracle 7.
>
> The question is: is there an easy way to write this query (maybe
> changing the index, or something like that) in order to make it fast,
> even in Access?
> If not, is there a solution in Oracle 7?
>
> Thank you.
Received on Fri Jul 03 1998 - 07:42:03 CDT
![]() |
![]() |