Agree angelIII:
Whit COUNT(1) and into any table ('REPOSICI','TRANSFER','PR
what do you thing about?
Jair
Main Topics
Browse All TopicsGood Afternoom
select count(*) CONTADOR
From TICKLER_RECORDS
where tickler_code in ('REPOSICI','TRANSFER','PR
and tickler_status = 'OPEN'
and customer_id = :CID
This sentence have a improvement in performance?
Thank
Jair
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Try rearranging the order of criteria, checking if tickler_code value is in the array is the most resource intensive and since you are using AND logic when the query gets parsed the code should abort as soon as a simple criteria such as tickler_status = 'OPEN' is not met. If this is truly more efficient depends on the implementation of the underlying code however it is worth a try.
From reading few references it appears that it does matter however I was mistaken it will evaluate starting with the last one first, unless ordered_predicates are used, so the order should be as it was originally set.
http://articles.techrepubl
http://www.dba-oracle.com/
that's true, BUT, it's a bit more "complex", as the meaning of "evaluating" does not mean the full processing.
it means that it will check how to run the queries, ie which indexes to use, in that order.
so, if there is an index like I suggested in the first comment, the explain plan will be the same whatever order the conditions are listed in the where clause.
count(1) vs count(*) is marginally faster. so marginal that usually, you won't be able to notice the difference until you run the query many times.
>if I use a table with the list ('REPOSICI','TRANSFER','PR
I understand, you would want to store that list in a table, and use a IN ( select from that table) or JOIN to that table instead.
even without testing, I am quite sure that your original code will be fastest, compared to the table alternative.
or also read up here:
http://asktom.oracle.com/p
Business Accounts
Answer for Membership
by: angelIIIPosted on 2008-08-31 at 11:40:31ID: 22355916
>This sentence have a improvement in performance?
improvement over what alternative? or do you want some "better" syntax?
in the second case, there is no "better".
the only way to make this efficient is having an index on customer_id + tickler_status + tickler_code