-
full table scan query?
Hi firends,
I created an Oracle Form screen block for the EMP table. It contains
field columns EMP.EMPNAME, AND EMP.EMPNO.
The table has 2 indexes each on these columns.
1. Then i enter a query and put "SCOTT" on the empname field. And
it retrieve the record fast.
2. Then i enter a query and put "SCO%" on the firstname field. and again the query returns fast.
My question is... is query #2 use the 'LIKE' contidion clause?
Because I tried to search the EMP table using this command:
sql> select * from emp where empname like 'SCO%' ;
....and the query took very long to retrieve the record.
How can i make this sql*plus query use the index?
Thank you all in advance...
-
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
Re: full table scan query?
Originally posted by rommel
How can i make this sql*plus query use the index?
What's the query plan?
Jeff Hunter
-
Thanks EVERYONE
Actually the problem is this
I just got a delimma in our TRAVEL-BLACKLIST inquiry system....
we have a DEROGATORY table (FIRSTNAME(not null),MIDNAME, LASTNAME(not null),...ect)
We usually DERO-CHECK an alien thru his names, and the program must
adjust or accomodate most encoding errors done by the ecoders.
Example the Name(chinese)
XIU ZHU CHUANG (fisrtname,midname,lastname respectively).
The encoder encode it as:
Fistname='Xiu zhu'
midname=null
Lastname='chu ang'
How can i program and hit this kind of combination error?
Or any advice what constraints can possibly add to minimize char
encoding error and speed-up data search?
Thanks a lot...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|