Do I need SQL_NO_CACHE for write intensive query? When I establish a connection to DB, I have to write about 30,000 records with an INSERT statement. I've read in a book that I should do it !

Questions


Do I need to do SQL_NO_CACHE ?
Is it gonna increase performance and insert rate?
No.

SQL_NO_CACHE is only relevant for SELECT statements. It is not an option for INSERT or LOAD DATA statements. "The SQL_CACHE and SQL_NO_CACHE options affect caching of query results in the query cache"

Moreover, the query cache itself has to be enabled, then is invalidated when the underlying dataset has changed.

If you're performing a series of SELECT statements at the same time as the bulk load, then you will save a few microseconds by using SQL_NO_CACHE, but it is only an option as part of the SELECT.