Jump to content

is in mysql have timeout setting?


plusnplus

Recommended Posts

Hi dreamwest ,

thanks for the reply.

the query is just normal query:

- select  16 field

- with 4 condition

- from 1 table

- sort by 6 field

 

estimated record to be display -+ 12.000 records

 

i'm using normal pc :

intel core 2 duo, e8400 @3 ghz,

2gb ram

sata harddisk 250 gb.

win xp

apache 2.0

php 4.0

mysql 4.0

 

if i make more condition in query, the result can get full -+ 1000-1500 records, but once i reduce the query condition, the broswer always stop in 1800 plus record.

 

btw, how to indexing record in the table?

Link to comment
Share on other sites

No wonder its timing out you 12,000 rows in one hit.

 

2 solutions:

one is to query 20 rows at a time and use LIMIT 1,20,

 

"SELECT * from table LIMIT 1,20"

 

the second is to add a tmp field in the table and make it tinyint, then just select and update rows where tmp ='0'

 

"SELECT * from table WHERE `tmp`='0' LIMIT 1,20"

 

after successful query update the tmp field to 1

Link to comment
Share on other sites

Hi dreamwest ,

 

it is something statistic record that need display in full -+ 12,000 records. records in table actually more then 60,000 records.

is mysql not the right one to do the job? or there is setting to make longer timeout beside one in apache setting?

 

btw, how actually 'LIMIT 1,20' working ? when i try it, it only display 20 record, but the sum of 12,000 records still calculate and show.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.