14. But...
id is AUTO_INCREMENT, so its 1
lets run that again
mysql>CREATETABLEt(
>idINTNOTNULLPRIMARYKEYAUTO_INCREMENT
>);
QueryOK,0rowsaffected(0.00sec)
mysql>INSERTINTOt(id)
>VALUES(NULL);
QueryOK,1rowaffected(0.04sec)
mysql>SELECT*
>FROMt
>WHEREidISNULL;
++
|id|
++
|1|
++
36. Load data in order
mysql>loaddatainfile'/tmp/city_order.txt'into
tableCity_huge;
QueryOK,818027rowsaffected(15.86sec)
Records:818027Deleted:0Skipped:0Warnings:0
mysql>loaddatainfile'/tmp/city_rand.txt'into
tableCity_huge;
QueryOK,818027rowsaffected(33min23.57sec)
Records:818027Deleted:0Skipped:0Warnings:0
46. External tools
mysqlsla
http://hackmysql.com/mysqlsla
mysqlsla parses, filters, analyzes and
sorts MySQL slow, general, binary and
microslow patched logs in order to
create a customizable report of the
queries and their meta-property values.
47. External tools
mysqlidxchk
http://hackmysql.com/mysqlidxchk
mysqlidxchk (MySQL Index Checker)
checks MySQL databases/tables for
unused indexes. Given one or more
slow, general, or quot;rawquot; log files,
mysqlidxchk reports which indexes in
the database schema are not used by
the queries in the log files.
73. What else?
MySQL Proxy
https://launchpad.net/mysql-proxy
MySQL Sandbox
https://launchpad.net/mysql-sandbox
MySQL Random Query Generator
https://launchpad.net/randgen