|
May 13, 2016, 12:54:38 PM Last edit: May 14, 2016, 02:47:11 AM by elobizph |
|
I need someone who can cache my query in my url shortener site. and how much it should be.
Full details
Hi it is a url shortener and my hosting said this my developer is a little bit busy so I need to fix this as soon as possible
My hosting said
However, we see another 'slow' query, which takes about a second to complete and downloads the whole 'views' table from the database for some reason, with all the rows:
select * from views
It gets about half a million records, nearly every second, and that affects your site's performance negatively.
Also, it is highly recommended to use some caching in your script, and cache the database query result, rather than send the same 'slow' query frequently.
my developers review
Using * is always a problem. Bcoz by using * you are actually giving MySQL work to find all tables first and then take the data. Instead of this best is .. If you want every table then better write SELECT rowname,rowname1,rowname2 FROM views
|