Hi all,

We have quite a large table, and are considering splitting the data into
daily tables - something like tblname_20040721, tblname_20040722, etc.
Hopefully, this will allow us to more easily delete old data through
dropping the old tables, instead of using DELETE. (At present, we're
inserting data into this table faster than we can remove it...)

I was wondering if anyone has any experience and advice to give on going
down this path, that they would be willing to share?

Specifically, I'm concerned by the possibility of inserting data into
the "wrong" table: Say a client notes that the date is 20040721
23:59:58, and so decides to insert the data into the tblname_20040721
table - and then, when the insert happens, it's now 20040722 00:00:01.
If the table has a timestamp column that is set by the MySQL server,
then the timestamp will be in 20040722, but the data will be inserted
into the table for 20040721.

Obviously, this could also happen should NTP get out of whack...

Perhaps it would be better to insert the timestamp, rather than letting
MySQL set it. Or, is there perhaps a way to let MySQL select which table
to perform the insert into, based on the time?

Any ideas or comments?

TIA,

--
Andrew Hill
Developer
Awarez Ltd.
Kirkman House, 12-14 Whitfield Street, London W1T 2RF
T: +44 (0)20 7299 7370  F: +44 (0)20 7299 7374

----------------------------------------------------------------------
The information in this email is confidential and is intended solely
for the addressee. It may be legally privileged. The contents are not
to be disclosed to anyone other than the addressee and access to this
email by anyone else is unauthorised.
Unauthorised recipients are requested to preserve the confidentiality
of this email and to advise the sender immediately of any error in
transmission. Any disclosure, copying, distribution or action taken or
omitted to be taken in reliance upon the contents of this email by
unauthorised recipients is prohibited and may be unlawful.
----------------------------------------------------------------------

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to