… 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: SQL Injection Questions Followup
… the digital library subscription services? You can purchase my book SQL Antipatterns: Avoiding the Pitfalls of Database Programming in digital formats…, even one that writes dynamic SQL. And it only takes one SQL injection vulnerability to cause a big problem. Your site is only… database must be protected again if you use query results in a subsequent SQL query, then you should be able to store…
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 …

