hello,
because of accuracy I use everywhere text entries even for numerical
entries.
So if I have to select max or min items I use cast: e.g
I have exactly: 2310556 rows in the table
1. all CAST
select * from "SOME_table" where cast(UTCTimestamp AS INTEGER) = (select
max(cast(UTCTimestamp AS INTEGER)) from "SOME_table")
takes about 8436 msec
2. Less CAST
select * from "SOME_table" where UTCTimestamp= (select
max(cast(UTCTimestamp AS INTEGER)) from "SOME_table")
takes about 2823 msec
3. NO CAST
select * from "SOME_table" where UTCTimestamp= (select max(UTCTimestamp)
from "SOME_table")
takes about 1 msec
in this particular case it gives me back all the same results but in
other cases I need the Cast version.
NOW is there a way to speed this up except inserting the data as numeric.
Thanks W.Braun
for my first discussion on way I need text entry see topic: Is there a
way to do comparison of text in a numerical way.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------