How to open a huge sql file

Ever wondered what program to use to open a huge sql (or any other text) file, when everything else fails (including Notepad++)?

I recently had to review a 4.7GB sql dump file (mysqldump output) before trying to import it to the target MySQL database. Unfortunately, due to the size of the file all installed editors failed to open it. So I tried my chances with Chrome and it seemed to work fine. The file started immediately loading on the screen although it was loading slowly.

At some point I got a message saying: “Google Chrome ran out of memory while trying to display this web page”
but at least I was able to see the things I needed to before it crashed. So, a browser is probably your best chance to inspect a huge text file on a windows machine…

Other options?

  1. Find a linux box and open the file with any of the following: more, less, head
  2. Wait until Windows adopts bash scripts (it is already announced that it will)
  3. Start importing the script and wait to see the result! (just kidding)

Leave a Reply

Your email address will not be published. Required fields are marked *