May 25, 2012

Post: Logging MySQL queries from the client instead of the server

query log” is the single most valuable way to examine query execution on your MySQL server. Queries are logged with timing…so overloaded that nobody could get into it if they …queries. For example, if you are using PHP with mysqlnd, you can create a plugin that logs the queries, such as the query

Post: Flexviews - part 3 - improving query performance using materialized views

…_id) group by customer_id, customer_name, sale_when; $ php convert.php demo < sales.sql CALL flexviews.create('demo', 'dashboard_customer_sales... about of time: mysql> call flexviews.enable( -> flexviews.get_id(‘demo’,'complete_example2′)); Query OK, 0 rows affected (42 min 42.14 sec) mysql> call…

Post: Apache PHP MySQL and Runaway Scripts

… due to programming error or due to very complex query you can get your PHP script running too long, well after user stopped… wrong and if I would use real MySQL queries this would be counted to max_execution_time and so script will be terminated… seconds (spending this time on MySQL time) one is doing single query another 1000 queries 1 second length each. Neither of them gets killed: Another one…

Post: Shard-Query EC2 images available

… 2010′; mysql> use ontime1; Database changed mysql> show table …query #generate a config for 20 shards (adjust to your number of nodes) phptime, the second exec time, the third parse time). $ echo “select count(*) from ontime_fact;” | ./run_query…value throughput over response time, get a good plan…

Post: Shard-Query turbo charges Infobright community edition (ICE)

query.php script and the output was captured with the ‘tee’ command. $ cat one.ini [default] user=mysqlqueries, followed by a response time table recording the actual response times for each query. The queries

Post: Wishes for new "Pure PHP" MySQL driver

If you’re following MySQL or PHP landscape you should have seen announcement by MySQL to develop pure PHP driver. If not – Here is… like to be able to get a table below page output listing all the queries, their exec times and number of rows they… in many cases. Multiple concurrent queries I would like to be able to run multiple queries for multiple MySQL connections at once. For…

Post: Handling big result sets

mysql_unbuffered_query instead of mysql_query. execution time: 54.34 s Good improvement. The identical results we can get with mysqi_ family. There is mysqli_query

Post: Are PHP persistent connections evil ?

As you probably know PHPmysql” extension supported persistent connections but they were disabled in new “… have 4000 of queries running at the same time which may never self-resolve as users will get extremely poor response time and will… could get much more problems with it. Persistent connections were added to PHP during times of MySQL 3.22/3.23 when MySQL was simple…

Post: mk-query-digest, query comments and the query cache

… for the LAMP stack. Instrumentation-for-php collects information about the PHP process such as wall time, cpu time, mysql query times, etc, and automatically places this… see, the first loop of the queries (that is, those with no comment at all) get 1000 misses. Everything beyond that is…

Post: PHP Large result sets and summary tables.

… of swap space) like crazy. Why ? Because by default mysql_query uses mysql_store_result C library call and buffers all result set… checking If you use buffered query the only real call you can get errors is when you run mysql_query , mysql_fetch_row simply reads… time But is this the only way ? Of course not. First you should consider if you need to do processing in PHP