Re: MySQL Performance Tuning on my server
Posted by:
Paola Moro
Date: November 16, 2008 01:04PM
Hi Rick,
May you give me more info/link to explain best implementations of pagination?
Anywhere, I use php/pear db object to execute query and paging to manage a little community.
The following queries are use a lot from my xml-flash gallery with voting system:
es1, total account created:
$tot_q= "SELECT count(*) FROM $TABLE;";
$totale=$db->getOne($totale_q);
es2, last user account created:
$query_q= "SELECT * FROM $TABLE ORDER BY id DESC LIMIT $start,?;";
$query=$db->getAssoc($query_q,false,array($PERPAGE),DB_FETCHMODE_ASSOC);
es3, top 10 user with big average and number of vote:
$node_q= "SELECT * FROM $TABLE ORDER BY vote DESC, avg_voti DESC LIMIT 0,$CHARTNUM;";
$node=$db->getAssoc($node_q,false,null,DB_FETCHMODE_ASSOC);
Thanks,
Paola