Eddie On Everything

Tips & tricks on things that interest me

Entries Tagged ‘mysql’

MySQL Performance Tip: ON DUPLICATE KEY is faster than INSERT IGNORE, but failing with a duplicate key error is a lot faster

I’m working on merging a couple of pretty big MySQL databases.
Each database consists of just three tables, but each of those tables has at least 9 million rows.
Because I need to maintain and update a number of data associations, it was necessary to write a custom script to perform the merge. (I chose to [...]

Uploading Large Files to a LAMP setup – upload_max_filesize, post_max_size, and max_allowed_packet

So you’re trying to upload a large file via PHP and you’re getting an error, eh? It’s probably because of PHP’s default configuration, which limits uploads to 2 Megs, or because of MySQL’s default 1.5 Meg limitation. Here’s how you change these defaults.
First, find your php.ini file. If you don’t know where [...]

  

Show your appreciation