Dear all,
how do I know whether an index is really used by a data step? I user SAS 9.2 and the data file is a sas file with a simple index on one field. The data step has a where statement.
Best regards,
Eva
No message isn't what is implied by the documentation:
To display information in the SAS log regarding index usage, change the value of the MSGLEVEL= system option from its default value of N to I. When you issue options msglevel=i; , the following occurs:
If you are just trying to test whether using an index will be beneficial, you can always force it by using the idxwhere and/or idsname options.
Dear Keith,
I've tried it and see nothing in the sas log which haven't seen before. Does that mean that the index is not used?
Eva
Hi Eva,
That is my understanding.
Regards,
Keith
Out of curiosity (and I don't really know if it makes a difference) are you using a where option in a set statement, or actually including a where statement?
I have a where statement in the data step like in this example:
data work.myfile;
set report.xyfile;
where a = 100;
run;
No message isn't what is implied by the documentation:
To display information in the SAS log regarding index usage, change the value of the MSGLEVEL= system option from its default value of N to I. When you issue options msglevel=i; , the following occurs:
If you are just trying to test whether using an index will be beneficial, you can always force it by using the idxwhere and/or idsname options.
Use the MSGLEVEL=I sas system option. For further reading, take a look at: http://www2.sas.com/proceedings/sugi29/123-29.pdf
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.