Date: Thu, 15 Jun 2006 17:06:38 -0400
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: Another question about indexes
Content-Type: text/plain; charset="us-ascii"
Best to start with 2. A WHERE clause on each of the 2001-2005 datasets
referenced in the view will greatly accelerate processing of the view.
In an equivalent SAS SQL UNION query, the optimizer will likely push a
single WHERE clause down to each dataset being referenced.
As for 1., indexes on subsetting variables may speed up selection of
subsets, but will probably not be needed on the date and foo variables.
From: firstname.lastname@example.org [mailto:email@example.com]
On Behalf Of Scott Bass
Sent: Thursday, June 15, 2006 9:03 AM
Subject: Another question about indexes
Say I have datasets data_2001 data_2002 data_2003 data_2004 data_2005.
I index them on the more commonly used subsetting variables. They are
simple (not composite) indexes.
1. If a where clause is something like:
where date between start and end and foo in ("foo", "bar", "blah") and
should I assume that the indexes will greatly speed up the where clause
processing? Sorry I know this is a bit vague - does anyone know where
to look in the doc for details on how indexes are used with where
2. If I create a data step view such as:
data total / view=total;
set data_2001 data_2002 data_2003 data_2004 data_2005;
then use the same where clause as above, but on the DSV, will the
indexes help performance?