Sunday, 15 July 2012

sql - What is a good/healthy mysql query execution time? -



sql - What is a good/healthy mysql query execution time? -

what good/healthy mysql query execution time?

to calculations:

the site gets 1000 unique visitors per hr

10 page view each unique visitor

5 minutes each unique visitor (i'm ignoring this. should, right?)

1000*10=10000/(60*60) = 2.7 views per second.

i have 3 queries on every page. 2.7*3 = 8.1 queries per second

1 second/8.1 = 0.123

so average query execution time must less 0.123.

assuming visits don't increase, can less 0.123 works healthy database?

edit: learned model describe server @ 100% capacity should aim 25-50% capacity. i'm newbie , don't know how go on on this.

your calculations on right path determining load on server. however, misses fact database server can handle multiple queries @ same time.

this difference between "bandwidth" , "latency". "bandwidth" number of queries can processed during period of time. "latency" amount of time take results 1 query.

in general, when looking @ returning values users, want database portion of queries finish in less couple hundred milliseconds (and within tens of milliseconds). allows other components of ui -- particularly network, application-side logic -- homecoming within sec or two. reasonable response time many applications. should take appropriate value -- 50 msec, 100 msec, 200 msec -- application , design database , hardware accomplish goal.

you accomplish such times through several strategies, particularly focusing on indexes speed database searches , on keeping commonly used info in memory.

mysql sql database

No comments:

Post a Comment