One suggestion...
Do a select group by query versus a select distinct.
Select fld1, fld2
From file
Group by fld1, fld2
Would give the same requests as
Select distinct fld1, fld2
Just try to see if VE gives a different answer.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Loyd Goodbar
Sent: Monday, July 26, 2010 2:25 PM
To: Midrange Systems Technical Discussion
Subject: Re: Using an SQL index over DDS file?
Thanks for the replies.
Luis, index advisor does not recommend any indexes. If I put a qualifier in
the select, such as "where i1azcd='WV'", VE shows the index in use but the
run time is the same, between 60 and 90 seconds. I was hoping that since I
select only the columns from the index it would perform much faster. As to
any gotchas, I was referring akin to runtime performance: will the query
perform differently because I call it from iNav or STRSQL or embedded?
Michael, I try to create new database objects with SQL. As you suggested, I
created a logical file. However, even selecting directly against the LF, VE
reports a table scan is performed.
Charles, there are 14 indexes on the table, including this one. Running the
query with STRDBG and STRSQL did not yield any messages or index advice. VE
reported the query optimizer did not time out. It reports "Indexes exist but
none could be used".
I can't do more testing until I reboot, as Run SQL Scripts now refuses to
run scripts or VE.
Thanks again,
Loyd
As an Amazon Associate we earn from qualifying purchases.