June 19, 2013

Comment: MySQL Partitioning - can save you or kill you

… stay in the buffer_pool.) If I recall correctly, any INSERT/DELETE/etc always opens all partitions, even before thinking about… find otherwise.) I would argue that single-row queries (SELECT, INSERT, DELETE, UPDATE) are similar in speed between PARTITIONed or non… go into more details (and code) here: http://mysql.rjweb.org/doc.php/partitionmaint The third use case for PARTITIONing involves 2D…

Comment: SimCity outages, traffic control and Thread Pool for MySQL

… queues) that accepted connections from the app (php, java, python, etc) and then passed the … just how far things have come with MySQL clustering performance: http://themattreid.com/wordpress/2013/…to host rapidly scalable NDB clusters (commence with inserting a shameless plug that users can then …

Post: Using Flexviews - part two, change data capture

… capture the initial binary log position. php ./setup_flexcdc.php –ini consumer.ini $ php setup_flexcdc.php setup starting setup completed If the setup… to `test`.`demo` will automatically be captured. Insert data in one transaction (two rows): mysql> insert into test.demo values (NULL,2),(NULL…

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… can’t use mysql_num_rows() and mysql_data_seek() if you use this method but this is told in PHP manual and… you need to do processing in PHP at all. Many summary tables can be built by INSERT … SELECT, or some others purely…

Post: MySQL File System Fragmentation Benchmarks

… 1 10 100 1000 10000; do ./benchmark.php $i 10000000; mysql -e’drop database test1′; mysql -e’create database test1′; done; tables: 1… of tables and does specified number of inserts going to random tables. I used default MySQL settings for MyISAM (table_cache=64… 1 10 100 1000 10000; do ./benchmark.php $i 10000000; mysql -e’drop database test1′; mysql -e’create database test1′; done; tables: 1…

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

…; $ php convert.php demo < sales.sql CALL flexviews.create('demo', 'dashboard_customer_sales', 'INCREMENTAL'); SET @mvid := LAST_INSERT_ID();… | 155187034 | <-- too high +------------------+ 1 row in set (0.68 sec) mysql> select sum(total_lines) from dashboard_customer_sales ; +——————+ |…

Post: SQL Injection Questions Followup

…($sql); $stmt->execute($params); Radu M. asked: Q: What about INSERT-ing binary data? Do I have to protect myself in… load onto their database server.  Their MySQL server became CPU-bound, while their multiple PHP application servers were often idle, waiting for… you are careful to escape or parameterize to ensure you insert data values safely, and then also assume that data in…

Post: Read/Write Splitting with PHP Webinar Questions Followup

Today I gave a presentation on “Read/Write Splitting with PHP” for Percona Webinars.  If you missed it, you can still… look forward to. Q: What about write splitting (updates,inserts) on multiple MySQL servers? Or is it possible to split only read… slave lag more accurately is to use pt-heartbeat, which inserts the system timestamp into a dummy table once per second…

Post: Filling the tmp partition with persistent connections

… ML* files? When you run a big UPDATE, INSERT or LOAD DATA INFILE MySQL send the rows to the Binary Log Cache… physical memory, most likely killing system in the end. Conclusion MySQL can creates temporary files even thought those temporary files are… opened a bug report to follow this issue: http://bugs.mysql.com/bug.php?id=66237