May 26, 2012

Post: Handling big result sets

SQL query $query = ‘SELECT * FROM longf’; $result = mysql_query($query) or die(‘Query failed: ‘ . mysql_error()); // retrive result while ($line = mysql_fetch_array($result…: mysql_unbuffered_query() sends a SQL query query to MySQL, without fetching and buffering the result rows automatically, as mysql_query() does…

Post: Using GROUP BY WITH ROLLUP for Reporting Performance Optimization

… of extra temporary table for buffering helps us to get result set we’re looking for and workaround this limitation, though… completing in 30 seconds rather than 40. Though fetching all result set in this case is still significantly faster. So GROUP… I forced FileSort execution method for GROUP BY by using SQL_BIG_RESULT hint I can see GROUP BY executing about same time…

Post: Are larger buffers always better ?

…=MyISAM DEFAULT CHARSET=utf8 select sql_no_cache count(*) from t1 where c in (select sql_big_result count(*) from t1 where d=50… ahead and set them to 64M ? Not really – this could result in nasty suprises with full table scan LIMIT queries as…

Post: MySQL Session variables and Hints

… execution of particular query. First is MySQL Hints, such as SQL_BIG_RESULT, STRAIGHT_JOIN, FORCE INDEX etc. You place these directly into… query is executed, so I could do something like: SELECT SQL_SORT_BUFFER_SIZE=50000000 NAME FROM LARGE_TABLE ORDER BY…

Comment: Why MySQL could be slow with large tables ?

… of resulting rows is large you might get pretty poor speed because temporary table is used and it grows large. Using SQL_BIG_RESULT

Comment: Why MySQL could be slow with large tables ?

…. It’s losing connection to the db server. I tried SQL_BIG_RESULT, analyze table, etc… nothing seems to help Here’s my…

Post: Ultimate MySQL variable and status reference list

sql_auto_is_nullblogpercona.commanual sql_big_selectsblogpercona.commanual sql_big_tablesblogpercona.commanual sql_buffer_resultblogpercona.commanual sql_log_binblogpercona.commanual sql_log_offblogpercona.commanual sql_log_updateblogpercona.commanual sql_low_priority_updatesblogpercona.commanual sql

Post: Checking for a live database connection considered harmful

… design pattern, written in pseudo-code: function query_database(connection, sql) if !connection.is_alive() and !connection.reconnect() then throw exception… like this: function query_database(connection, sql, retries=1) while true try result=connection.execute(sql) return result catch InactiveConnectionException e if retries > 0… find and solve these issues, because it’d be a big help to apps when they grow. It’s one of…

Post: New SpecJAppServer results at MySQL and Sun.

…the new SpecJAppServer Results More information from Tom Daly can be found here These results are quite …in /etc/my.cnf (included in FDA) [mysqld] sql-mode = IGNORE_SPACE transaction-isolation = READ-COMMITTED …cache_size = 0M – query cache disabled. Not a big surprise though as this is default value …

Post: High-Performance Click Analysis with MySQL

…query parallelization, so ETL jobs written to rely on SQL tend to get really bogged down.  In contrast,… doing the work on a slave, then piping the results back up to the master with LOAD DATA INFILE,… nested-loop joins are not all that fast on big joins; the query optimizer can sometimes pick bad …