[FX.php List] [TIP] - use groupsize = 0 to speed summaries
DC
dan.cynosure at dbmscan.com
Fri Nov 17 10:49:46 MST 2006
Here's a tip for super-speeding up your code... when all you need is
a count for a found set you can send zero as the groupsize parameter
and speed up processing. this works because FX won't have any record
data to parse from XML into arrays.
NOTE: this **only** applies to FX code where you want to get the
foundCount only - for instance, in a summary. the data array item
will be empty.
// retrieve zero records when all you need is the found count
$fx_object = new FX ($IP, $port);
// put zero in the groupsize parameter
$fx_object->SetDBData($db, $layout, 0);
$res = $fx_object -> FMFind();
$count = $res['foundCount'];
echo $count;
i use this technique to build summary tables where i don't care what
the actual data is; i just want the counts.
enjoy.
dan
More information about the FX.php_List
mailing list