× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



LOL - who can think straight on the way to the Grand Ole Opry?

I had not thought yet of the mention of an index on the timestamp - I was thinking of not using the function. I do so much ad hoc stuff that I sometimes forget the larger implications - even after sitting next to Rob!

-------------- Original message --------------
From: rob@xxxxxxxxx

Vern should know better - he's been sitting next to me at the same Tom
McKinley sessions at COMMON. The suspicion should be a fact.

What may be confusing is enhancements in V6R1 getting a little better on
indexing some derived columns. However, so far I am getting the
impression that a derived index is only useful to use DDL to replace DDS
for traditional HLL access versus SQL access and are pretty much ignored
by the SQL optimizer except maybe for UPPER and a few related things.



Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Walden H. Leverich"
Sent by: midrange-l-bounces@xxxxxxxxxxxx
04/01/2008 07:04 PM
Please respond to
Midrange Systems Technical Discussion


To
"Midrange Systems Technical Discussion"
cc

Subject
RE: Using a TIMESTAMP field in a WHERE CLAUSE....






where date(timstp) between '2008-01-01' and '2008-12-31'
where timstp between '2008-01-01-00.00.00.000000' and
'2008-01-31-23.59.59.999999'
I suspect the second would perform a little better - don't know how
much.

If there's an index on the timestamp column (or is SQL would build one)
the second would perform MUCH faster. In the first case the system can't
use the index since you're not actually selecting on the column that's
indexed, you're selecting on the result of a function. This will result
in a tablescan. In the second case you can use the index.

-Walden

--
Walden H Leverich III
Tech Software
(516) 627-3800 x3051
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.