Welcome Guest, Not a member yet? Register   Sign In
Performance/Benchmark questions
#1

[eluser]hykoh[/eluser]
I just have a few questions about the performance with CI Smile

- What does the {memory_usage} calculate ? The RAM usage of the system or what else ?
- When should i optimize my system ? From which value of memory_usage / elapsed_time ?
At the moment my project takes 0.0602 / 1.31MB for one siteload. Is it too much ? it runs on a vserver without other load.

Another question is (i know - its maybe not the right forum, but nearly the same topic Smile), should i use

Code:
$sql = SELECT COUNT(*) AS cnt FROM example WHERE x = y
// i use PDO with a wrapper class
$stmt = $pdo->query($sql);
$row = $stmt->fetch();

return $row['cnt']

or

Code:
$sql = SELECT id FROM example WHERE x = y
// i use PDO with a wrapper class
$stmt = $pdo->query($sql);

return $stmt->numRows() // or known as mysql_num_rows()

Is it recommend to use COUNT about the database (if yes - should i use COUNT(id) or something like that instead of * ?)

Or should the num_rows() function get me more performance ?


Messages In This Thread
Performance/Benchmark questions - by El Forum - 10-08-2008, 02:40 AM
Performance/Benchmark questions - by El Forum - 10-08-2008, 02:47 AM
Performance/Benchmark questions - by El Forum - 10-08-2008, 08:14 AM
Performance/Benchmark questions - by El Forum - 10-21-2008, 03:36 AM
Performance/Benchmark questions - by El Forum - 10-21-2008, 06:13 AM
Performance/Benchmark questions - by El Forum - 10-21-2008, 06:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB