Hello people,
I'm optimizing my script because my server is under heavy load in the
evening.
I have a question which methode is more efficient for my server:
=============== ===
//connection with database is already open because other queries where
executed first.
$sql="select * from category where siteid=?" // category table
contains about 1000 records, only 10 are returned
//loop with php code through resultset and print the name and id's of
category
=============== ===
or
=============== ===
<script src="cat.js"></script>
cat.js contains javascript document.write( ) instruction to write 10
categories.
=============== ===
In simple words: which is more efficient, a sql query with php or a
file read done by apache?
Thanks ;)
Jaap
I'm optimizing my script because my server is under heavy load in the
evening.
I have a question which methode is more efficient for my server:
=============== ===
//connection with database is already open because other queries where
executed first.
$sql="select * from category where siteid=?" // category table
contains about 1000 records, only 10 are returned
//loop with php code through resultset and print the name and id's of
category
=============== ===
or
=============== ===
<script src="cat.js"></script>
cat.js contains javascript document.write( ) instruction to write 10
categories.
=============== ===
In simple words: which is more efficient, a sql query with php or a
file read done by apache?
Thanks ;)
Jaap
Comment