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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.