MySQL Forums
Forum List  »  Performance

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

Options: ReplyQuote


Subject
Views
Written By
Posted
4643
November 14, 2008 10:01AM
2219
November 14, 2008 09:10PM
Re: MySQL Performance Tuning on my server
2209
November 16, 2008 01:04PM
2358
November 16, 2008 11:00PM
1839
November 17, 2008 04:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.