> "Jonathan" <jo******@heelal.nl> ¦b¶l¥ó
news:42**********************@text.nova.planet.nl ¤¤¼¶¼g...
Ray in HK wrote:
Will it be possible to specify the date format of type DATE during data
loading ?
I don't think it is possible. Why not import the data (maybe with the
date column in some new dummy column) and then reformat the data in the
correct representation using a query on the table?
Jonathan
Ray in HK wrote: Well , it's because there are quite lots of data and for testing
purposes, I need to re-load the data again and again while the dev machine is
s...l..o...w.
Anyway, thx for your advice. It'd be better if Mysql has such feature as
Oracle that allow the format to be specified during batch data loading.
I still think as it is for testing that you could once do the import and
then afterwards do a conversion as I suggested.
After you have done this backup the mysql table with the mysqldump tool
or the select into method. This way it is possible for you to restore
earlier status just by restoring your tables from the mysql backup/dump
and you only need to do the conversion of the date once.
Normally importing from a text file is slower than inserting from a dump
file as you can use some tricks which are explained here:
Explanation about the mysqldump utility:
http://dev.mysql.com/doc/mysql/en/mysqldump.html
Information about improving the speed of insert statements:
http://dev.mysql.com/doc/mysql/en/insert-speed.html
I cannot imagine that for testing all data need to be reloaded and
converted all the way from the source again as I think you use the same
set for testing over and over again.
Jonathan
N.B. One word of advice for posting in newsgroups/usenet:
I rearanged our conversation a little bit. For the future please don't
top post as this makes reading conversation more difficult. The most
recent answers in newsgroups are normally posted at the bottom and
redundant information is removed. If you want to answer multiple
questions asked in one message just post your answers in between.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?