Skip to content Skip to sidebar Skip to footer

More Time Consuming/cpu Extensive Insert Ignore Or Select Count(*)

I'm working with a program where I have to check hundreds of variables to see if they are already in the database. It usually takes a while to run. I'm using INSERT IGNORE for al

Solution 1:

First of all definitely don't do a SELECT and then INSERT, that's completely pointless. Instead, think about the below;

  • What kind of settings are these? Should they really belong in the database or in a PHP config file?
  • Investigate into LOAD DATA INTO which uses IGNORE on duplicate key by default.
  • Is it really nessasary to check all the time? Surely this will be only done upon installation/setup?

Post a Comment for "More Time Consuming/cpu Extensive Insert Ignore Or Select Count(*)"