title: MySQL makes my site load very slow
body: <p>I can't seem to find what the problem is.</p>
  
  <p>My homepage takes 5s to load and I suspected highly its because of MySQL. when I type my site url in the browser, I have to wait 5s only then it will load.</p>
  
  <p>I have dedicated server running intel celeron, centos with 1GB RAM. My database is approx 650mb in size with 200k records and i have index created for date,id etc.</p>
  
  <p>Here is my SQL query used in the homepage:</p>
  
  <pre><code>select `id`,`title`,`desc`,`contribution`,`date`,`sponsored`                
  from tbl_releases where date &lt;= CURRENT_DATE()  AND approved='1' 
  order by `date` desc,`sponsored` desc,`con` desc,`id` desc
  limit 100
  </code></pre>
  
  <p>I tried every everything like </p>
  
  <ol>
  <li>optimizing using my.cnf with buffer etc but its not improving the site performance.</li>
  <li>optimizing table.</li>
  </ol>
  
  <p>P.S: does database size have impact on performance? I have over 50% junk in database and does deleting useless rows help improve the performance? </p>
  
  <hr>
  
  <p>update: i did cleanup junk in the database and the performance improved dramatically and i noticed that server load and mysql cpu usage has gone significantly down from 36% to just 5% . But still what i dont understand, is why is mysql is slowing down on such large data, it should pretty much handle that much data. isnt it?</p>
  
  <p>Btw, i am using smarty engine, despite this, site is slowing down.</p>