I am in the process of going over my queries, and I have been reading articles about how you should use SQL_NO_CACHE
in SELECT
queries. This has confused me because every article in the end has a different conclusion on when to use this. One blog I have read said you should use this if you have identical queries, and are unique. On another blog I read that you should use it when you have to extract information that never changes.
Can someone explain to when is a good practice to use this? I know it's been asked before but reading a lot of articles didn't help, especially when people are saying to use this method in different situations. I made some theoretical situations, can someone tell me if it's beneficial to use SQL_NO_CACHE
. Thank you and I do apologize for a repeated question. I'm just really confused.
Say a website store its configuration (i.e. site name, site description, keywords), and on every page a query request is made to extract this information as it's required on every page.
You select a
userID
during a log in check, the query only runs during the log in check process.You select some data from table
a
in order to update a field in tableb
, should you useSQL_NO_CACHE
on the select for tablea
?
Thank you.
See Question&Answers more detail:os