mysql_data_seek takes...0.15 seconds !!!!

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi all,

On my testing machine (P4 2ghz, WinXP, Apache, PHP 4, mysql 4.1), when I do
a mysql_data_seek it takes up to 0.15 seconds.

My query that returns all results takes an average of 0.05 seconds on my
machine. The mysql_data_seek on this query result takes 0.15.

How it is possible ? It's there any bug ? I know my ISP is much faster, and
I can't compare with my computer, but this let me thing that I should better
execute a query for the desired records instead of doing a data_seek.

They are about 170 records in the result, taken from 20 tables of an average
of 10 fields each, with around 3000 records in each table. I do show only 10
results on my page, and when I do click on next or previous page, I then
"seek" the 10 next records.

Also I've 2 possibilites to improve performances:
1: Execute 2 queries: one that count the result's ID and an the same wich
returns the result of 10 records
2: Execute the complete query and count from there. Also use seek to show
the correct results.

for now I use the second choice, but performances are very poor.

Since I can't pass the query result from a page to another, at any time I
change the page, I 've to execute the query again

Any advice would greately be appreciated.


Site Timeline