Re: fragment table by date?
Posted in 1998
ralph.halter@pac.panmail.com offerred: + One of my problems is that I can't fragment by MONTH(my_date) so +the fragmentation expression becomes an ugly list of " senddt +<='01/31/1998' +and senddt >='01/01/1998'" statements. Any suggestions? Remember that in informix dates are stored internally as integers representing the number of days since 12/31/1899. When you provide a date value as a quoted string ("01/31/1998") it has to first be converted to integer before being used. So using such quoted strings in sql, especially in fragment expressions, can slow things down. Instead, take advantage of the internal storage mechanism and specify your date values as integers ("01/31/1998" == 35825, for example). Your expression then becomes: senddt between 35795 and 35825 in dbspace1, etc. -- Dave Kosenko davek@summitdata.com Director of Training Services (732) 469-4070 Summit Data Group (an Informix Authorized Education Center)