title: Filesize: CSV vs MySQL
body: <p>I am trying to optimise my MySQL table structure for a 3GB CSV file.  So far, I have managed to import 60% of the 19m+ rows, with a MySQL table size of 5.5GB.  How could I optimise my table structure to reduce the database table size?  (as I am running out of disk space!)</p>
  
  <p>A sample line from the CSV file is</p>
  
  <pre><code>"{0C7ADEF5-878D-4066-B785-0000003ED74A}","163000","2003-02-21 00:00","UB5 4PJ","T","N","F","106","","READING ROAD","NORTHOLT","NORTHOLT","EALING","GREATER LONDON","A"
  </code></pre>
  
  <p>...and my database structure is:</p>
  
  <pre><code>(
  `transaction_id` int(10) unsigned NOT NULL,
    `reference` varchar(100) COLLATE utf32_unicode_ci NOT NULL,
    `price` int(10) unsigned NOT NULL,
    `sale_date` date COLLATE utf32_unicode_ci NOT NULL,
    `postcode` varchar(8) COLLATE utf32_unicode_ci NOT NULL,
    `type` varchar(1) COLLATE utf32_unicode_ci NOT NULL,
    `new_build` varchar(1) COLLATE utf32_unicode_ci NOT NULL,
    `tenure` varchar(1) COLLATE utf32_unicode_ci NOT NULL,
    `property_number` varchar(10) COLLATE utf32_unicode_ci NOT NULL,
    `property_name` varchar(100) COLLATE utf32_unicode_ci NOT NULL,
    `street` varchar(100) COLLATE utf32_unicode_ci NOT NULL,
    `area` varchar(100) COLLATE utf32_unicode_ci NOT NULL,
    `city` varchar(100) COLLATE utf32_unicode_ci NOT NULL,
    `county1` varchar(100) COLLATE utf32_unicode_ci NOT NULL,
    `county2` varchar(100) COLLATE utf32_unicode_ci NOT NULL,
    `unknown` varchar(1) COLLATE utf32_unicode_ci NOT NULL
  )
  </code></pre>