[U2] Unidata Index question

2013-05-23 Thread Jeffrey Butera

I have two question about how indicies affect queries:

1) If I have an index built for a given field FOO, and perform a query 
with like such as FOO LIKE 'ABC...'  does it benefit from the 
index?  Or is it only queries with equality conditions that benefit from 
the index (eg: FOO EQ 'ABC' )?


2) If I have an index built with Empties=NO and then query with that 
indexed field =, how does it handle the query? Does it not use the 
index at all?


TIA,
Jeff

--
Jeffrey Butera, PhD
Associate Director for Application and Web Services
Information Technology
Hampshire College
413-559-5556

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


Re: [U2] Unidata Index question

2013-05-23 Thread Martin Phillips
Hi Jeff,

1) If I have an index built for a given field FOO, and perform a query 
with like such as FOO LIKE 'ABC...'  does it benefit from the 
index?  Or is it only queries with equality conditions that benefit from 
the index (eg: FOO EQ 'ABC' )?

An index can be used for a LIKE comparison with a literal element at the start 
but not if the ... is at the start.


2) If I have an index built with Empties=NO and then query with that 
indexed field =, how does it handle the query? Does it not use the 
index at all?

Because the condition would be met by a null field and you have disabled 
indexing of null items, the index will not be used.

Beware of queries like
   WITH FLD  4
when using NO.NULLS as again the condition is met by a null item, preventing 
use of an index, whereas
   WITH FLD  4
could use an index.


Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200



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


Re: [U2] Unidata Index question

2013-05-23 Thread Dave Davis
For UniData -

FOO LIKE 'ABC'... I think so - because the first part is literal.
FOO LIKE ABC... I don't think so - because you aren't explicitly saying the 
first part is a literal.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeffrey Butera
Sent: Thursday, May 23, 2013 6:50 AM
To: U2 Users List
Subject: [U2] Unidata Index question

I have two question about how indicies affect queries:

1) If I have an index built for a given field FOO, and perform a query with 
like such as FOO LIKE 'ABC...'  does it benefit from the index?  Or is it 
only queries with equality conditions that benefit from the index (eg: FOO EQ 
'ABC' )?

2) If I have an index built with Empties=NO and then query with that indexed 
field =, how does it handle the query? Does it not use the index at all?

TIA,
Jeff

--
Jeffrey Butera, PhD
Associate Director for Application and Web Services Information Technology 
Hampshire College
413-559-5556

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



Dave Davis
Team Lead, RD

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
[http://www.harriscomputer.com/images/signatures/HarrisSchools.jpg]

[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]http://www.harriscomputer.com/
6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.comhttp://www.harris-schoolsolutions.com

This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged or confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please notify the sender immediately by e-mail and delete all 
copies of the message.

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