>>>> 2014/10/29 20:56 +0100, Zbigniew >>>> Now to the point: considering, that the second column shall contain about 100-200 different "labels" - so in average many of such labels can be repeated one million times (or even more) - will it speed-up the selection done with something like "...WHERE label='xyz' AND date='2013-02-25' " (and maybe the insertion as well?), if instead of textual labels I'll use SMALLINT as simple integer "code" for each different "label" (and in my program a translation table)?
If so - will I have further performance gain, if instead of human-readable DATE for the third column I'll use "Unix time" put into INTEGER type column, not DATE-type? <<<<<<<< I really cannot answer your real question, but say only that DATE and other time types are numeric, although mostly constructed. DATE takes three bytes with range '1000-01-01' to '9999-12-31'. TIMESTAMP (which has special features that one can suppress) is a four-byte integer that is a 31-bit Unix timestamp with range '1970-01-01 00:00:01.000000' UTC to '2038-01-19 03:14:07.999999' UTC. Maybe TIMESTAMP, which doubtless uses the underlying integer mechanism for comparison, is best for you. Consider also the functions UNIX_TIMESTAMP and FROM_UNIXTIME. The zone is not involved in DATE, but is involved in the rest aforesaid. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql