Kapalı

mysql query times out after certain period of inactivity $30

i have this situation.

using latest mysql server,

after some period of inactivity my website sqls times out (only some not all)

see attachments of table structures for same table on 2 different servers

see moreinfo file for more information.

*** Note - there is no issue with the website. the below can be execusted fine on other servers

but table structure is different.

Testing results

1. when execute a simple sql like (select count(*) from products) this works fine all the time.

2. when execute any of below sqls

(1)

SELECT [url removed, login to view] FROM products INNER JOIN catalog ON products.cid=[url removed, login to view] WHERE products.is_visible='Yes' AND ( products.inventory_control = 'No' OR [url removed, login to view] > 0 OR products.inventory_rule = 'OutOfStock' OR (products.inventory_control = 'AttrRuleInc' AND [url removed, login to view] >= 0) ) AND products.is_home='Yes' GROUP BY [url removed, login to view]

(2)

SELECT [url removed, login to view] FROM products INNER JOIN catalog ON products.cid=[url removed, login to view] WHERE products.is_visible='Yes' AND products.is_home='Yes' GROUP BY [url removed, login to view]

(3)

SELECT [url removed, login to view] FROM products INNER JOIN catalog ON products.cid=[url removed, login to view] WHERE products.is_visible='Yes' AND products.is_home='Yes'

(4)

SELECT [url removed, login to view] FROM products INNER JOIN catalog ON products.cid=[url removed, login to view]

(5) select count(*) from products - this runs fine

(6) select * from products limit 100 - this runs fine

it times out ( Note it will not timeout all the time, this happens after 1 hour or 2 hour of inactivity)

1. The very first execution takes 30+ seconds and it times out and after that the above executing SQL 2 to 3 times the 4th time onwards it executes fast in 3 to 5 seconds

after 1 or 2 hour inactivity this pattern repeats.

I did not do any changes in settings.

i have 2 sites on this server.

1st server has 20,000 rows of in database ( this one works fine ) 2nd site has 150,000 rows in the databse ( this one is having this issue)

*** i tested the above SQLs on another similr tables but with different keys it runs fine **

i am attaching table structure i am using on 2 different servers

So this is something "query time out"

i do not think this is something on SQL settings, if it is then i should see this behavior on both sites

can anyone help me

Beceriler: MySQL, SQL

Daha fazlasını görün: n query, execution table, sql mysql, simple query, query table, period, OUT, mysql query, databse, mysql join table, mysql table join, mysql database catalog, mysql structure, mysql help table, times website, sql select select, works join, execute seconds, mysql tables rows, help mysql, certain, query query, sql query help, join file, mysql join

İşveren Hakkında:
( 29 değerlendirme ) bear, India

Proje NO: #721398

6 freelancers are bidding on average $42 for this job

freelancerbuzzo

Ready to start right now.

1 gün içinde 30$ USD
(11 Değerlendirme)
4.4
Maxillus

I can help you.

1 gün içinde 30$ USD
(6 Değerlendirme)
3.8
Maven

Hi, I can help you.

1 gün içinde 30$ USD
(2 Değerlendirme)
1.8
raju4suresh

I will try .

in 5 gün içinde30$ USD
(0 Değerlendirme)
0.0
visagrawal

I want to give it a shot.

in 2 gün içinde30$ USD
(0 Değerlendirme)
0.0
suryavikas

Hi, We work on mySQL database a lot . Performing Tuning , Designing and development of the databases. We have faced problems like this , we need to perform the Database Tuning , Need to check the proper indexin Daha fazlası

in 10 gün içinde100$ USD
(0 Değerlendirme)
0.0