June 19, 2013

Post: MySQL Query Patterns, Optimized - Webinar questions followup

…: Why doesn’t the query optimizer take care the execution decisions? Since they are all logically the same, …for movies are distributed uniformly over the range 1..MAX(id)? Yes, there’s a risk if you … the result was a query that took half the time. An important conclusion of my presentation today is …

Comment: Implementing SchemaSpy in your MySQL environment

… at max approximately 3,000 tables per schema and perhaps 10,000 tables per mysqld instance. SchemaSpy does take some time to execute

Post: More on MySQL transaction descriptors optimization

… PRIMARY KEY lookups (aka QPS sysbench mode); same MySQL queries executed inside single-statement transactions (TPS mode, see the original post… –report-interval=1 –rand-type=uniform –forced-shutdown=1 –max-time=120 –max-requests=0 –percentile=99 –mysql-user=root –mysql-db=sbtest8t1M…

Comment: Apache PHP MySQL and Runaway Scripts

… MySQL query. Eventually the max_execution_time will be reached, as the execution of mysql_?, PDO etc are counted towards the max_execution_time, and the script… is not counted towards max_execution_time. In fact, in the 2nd example only the for() instructions count as execution time. So even this script…

Post: Apache PHP MySQL and Runaway Scripts

… other sites. Looking at Server-Status I’ve seen scripts executing for hours sometimes which is obviously the problem – they take… “TightLoop” script terminated after 30 seconds with “Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/tightloop.php… would use real MySQL queries this would be counted to max_execution_time and so script will be terminated within few seconds. This…

Comment: Apache PHP MySQL and Runaway Scripts

I have not encountered the same problem as you. When it reach the max_execution_time (setting in php.ini, I set it to 60), the script automatically stoped and print an error: “Fatal error: Maximum execution time of 60 seconds exceeded…”

Post: Evaluating IO subsystem performance for MySQL Needs

… events: 773835 total time taken by event execution: 59.0285 per-request statistics: min: 0.0001s avg: 0.0001s max: 0.0086s approx. 95 percentile: 0.0001s Threads fairness: events (avg/stddev): 773835.0000/0.00 execution time (avg/stddev… max: 0.0112s approx. 95 percentile: 0.0030s So we get about 3ms 95 percentile request time – not bad – all request were executed

Post: Virtualization and IO Modes = Extra Complexity

…: 0.06ms max: 0.34ms approx. 95 percentile: 0.06ms Threads fairness: events (avg/stddev): 1343.0000/0.00 execution time (avg/stddev): 0.0808/0.00 Ignore response times here as it times only writes not fsync() calls…: 1.11ms max: 259.69ms approx. 95 percentile: 5.31ms Threads fairness: events (avg/stddev): 33900.0000/0.00 execution time (avg/stddev…

Post: Identifying the load with the help of pt-query-digest and Percona Server

… total min max avg 95% stddev median # ============ ======= ======= ======= ======= ======= ======= ======= # Exec time 8s 1us 44ms 403us 541us 2ms 98us # Lock time 968ms 0 …data points such as the total query execution time and the average query execution time, the number of tmp tables created …

Post: Wrong GROUP BY makes your queries fragile

… our ability tune MySQL Performance as queries become fragile – changing execution plan leads to different query results. So what I’m… SELECT id,login,max(login_time) FROM log GROUP BY id,login May be replaced by SELECT id,login,max(login_time) FROM log GROUP BY id which may be faster especially if GROUP BY is executed via sorting…