Extreme solution:

1. change date field from datetime or timestamp to int type equivalent.
Warning do not use alter table, data will be lost; make a script to re
create the date data as int using unix_timestamp instead.

2. index the field.

3. rewrite sql as select id,datedue from table1 where datedue >
unix_timestamp("2006-01-01 01:01:01") .

 avoid use of select *, if possible get only the data you need

On Jan 17, 2008 3:56 PM, joebert jacaba <[EMAIL PROTECTED]> wrote:

> All,
>
> I have indexed due_date and account and got much better performance
> already.
>
> I don't really want to split the date into 1 or 2 ints. I use
> Hibernate and I want to maximize GregorianCalendar. I need to perform
> complex date operations I don't want to rewrite this functions. I rely
> heavily on Criteria and Projection.
>
> Joebert
> _________________________________________________
> Philippine Linux Users' Group (PLUG) Mailing List
> [email protected] (#PLUG @ irc.free.net.ph)
> Read the Guidelines: http://linux.org.ph/lists
> Searchable Archives: http://archives.free.net.ph
>



-- 
--
Roger P. Filomeno
International Project Manager
TechBiz Asia Group Pte Ltd

http://corruptedpartition.blogspot.com/
send MSG GODIE <YOUR MESSAGE> to 2948

$> who | grep -i blond | date; cd ~; unzip; touch; strip; finger; mount;
gasp; yes; uptime; umount; sleep
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to