3 Apr 10:45
phplist uclicks.php slow cause of big table
Oliver Leitner <shadow333 <at> gmail.com>
2009-04-03 08:45:27 GMT
2009-04-03 08:45:27 GMT
Hello Developers
I am trying to increase Performance on the Database queries which are
called from uclicks
This is how far i got till now:
$limitquery = Sql_Fetch_Row_query(sprintf('select HIGH_PRIORITY
SQL_CACHE SQL_BIG_RESULT count(phplist_message.owner) from %s where
phplist_message.owner =
%d',$GLOBALS['tables']['message'],$_SESSION["logindetails"]["id"]));
...
...
if (!$id) {
print $GLOBALS['I18N']->get('Select URL to view');
$req = Sql_Query(sprintf('select HIGH_PRIORITY SQL_CACHE
SQL_BIG_RESULT distinct url, linkid, sum(clicked) as numclicks from %s
where clicked %s group by url order by numclicks desc limit
'.$limitquery[0],
$select_tables,$owner_and));
$ls = new WebblerListing($GLOBALS['I18N']->get('Available URLs'));
while ($row = Sql_Fetch_Array($req)) {
$ls->addElement($row['url'],PageURL2('uclicks&id='.$row['linkid']));
$ls->addColumn($row['url'],$GLOBALS['I18N']->get('clicks'),$row['numclicks']);
}
print $ls->display();
return;
}
...
...
(Continue reading)
RSS Feed