That's too bold a rule of thumb for me, Bob.
I will grant you that indexes need to be well thought out.
It also depends on what percent of the entire file you retrieve via the index. If it is too large, a filescan via basic select or NO,.INDEX keyword is quicker.

Bob also made a comment about relative speed of retrieve's select vs. basic.
I must admit that I have often been pleasantly surprised at how fast retrieve is even when it looks like I ought to be able to do it faster in basic.

On 10/25/2011 4:42 PM, Woodward, Bob wrote:
Add a second selection criteria and the benefit of the index is washed
out.

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles
Stevenson
Sent: Tuesday, October 25, 2011 2:39 PM
To: U2 Users List
Subject: Re: [U2] UniBasic Question

True on UV, too.
Compare output of these using EXPLAIN keyword:
LIST FILE WITH indexed_field = "soemthing"  EXPLAIN
LIST FILE WITH indexed_field = "soemthing"  EXPLAIN  NO.INDEX

Or forget EXPLAIN, but do it with a large file and notice the speed
differnce.

On 10/25/2011 4:29 PM, charles_shaf...@ntn-bower.com wrote:
I don't know if I agree that SELECT is faster.  If you are using
indexed fields, SELECT is definitely not the good choice.
Are you saying that when there is an index, the system does not need
to
read the record at all?  It just gets the SELECT list from the index?
Is
this only true in Unidata?

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to