June 19, 2013

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

… ALTER statements, and it appears to work fine. But here’s where things start to get even weirder. According to the documentation….00 sec) mysql> insert into dir_test_innodb (full_name, details) SELECT reverse(full_name), details FROM dir_test_innodb WHERE id < 500000; Query OK, 245051 rows affected (8 min 13.13 sec) Records: 245051 Duplicates: 0 Warnings: 0 mysql> select…

Post: Test Drive of Solid

…MyISAM’); mysql> begin; mysql> update test2 set names=’mysqlwhere id=1; Session 2: mysql> begin; mysql> update test2 set names=’Solid’ where id=2; Session 1: mysql…. Let’s look how PESIMISTIC works (mysqld started with –soliddb_pessimistic). Test 1: Deadlock detection: Session1: mysql> begin; …

Post: Eventual Consistency in MySQL

… columns are non-null, it’s a foreign key. mysql> SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME IS NOT…time: $ cat generate_foreign_key_checks.sql | mysql -N | mysql -E *************************** 1. row *************************** test.Bar.ID: 42 DIY RI We can get …

Post: InnoDB Full-text Search in MySQL 5.6: Part 2, The Queries!

… matches MyISAM’s default ft_min_word_length. First, MyISAM, with MySQL 5.5, on the SEO data set: mysql: SELECT id, title, MATCH… | +——+———————————————————————–+——————–+ The same query, run against InnoDB on 5.6.10: mysql: SELECT id, title, MATCH(title, body) AGAINST (‘arizona business records’ IN…’t appear to be mentioned anywhere in the MySQL 5.6 documentation; every place where it talks about creating one of these…

Post: How Percona does a MySQL Performance Audit

… ~]$ tail -n 25 /proc/cpuinfo power management: processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R…/lib/mysql and it’s reading from /etc/my.cnf. I’ve seen a lot of cases where there’s a /var/lib/mysql and an /etc/my.cnf, and the server is installed in /customsoftware/mysql with a…

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… TBL WHERE hash=crc32(‘string’) AND string=’string’ The other thing you need to consider is string comparison in MySQL is case…’s say I have a table named PO that has a primary key of PO # and 2 additional fields for vendor_id… everything itself. Especially when using a CMS where DB structure is prepdefined A: MySQL Server will not automatically define any indexes for…

Post: Edge-case behavior of INSERT...ODKU

… to be considered as being defined first. So, MySQL checks our INSERT, sees that the next auto-… to “UPDATE update_test SET host_id=7, last_modified=NOW() WHERE id=4294967295 OR username=’foo’ LIMIT 1″, … good idea; it wastes half of the column’s available range. Intuition, like the laws of physics, …

Post: Percona XtraDB Cluster: Multi-node writing and Unexpected deadlocks

… | +—+——-+ 3 rows in set (0.00 sec) node1 mysql> update autoinc set j=”node1″ where i = 1; Query OK, 1 row affected… lock struct(s), heap size 376, 1 row lock(s), undo log entries 1 MySQL thread id 3972, OS thread handle 0x7fddb84e0700, query id 16408… rows in set (0.00 sec) node3 mysql> update autoinc set j=”node3″ where i=1; Query OK, 1 row affected (0…

Post: MySQL 5.6.10 Optimizer Limitations: Index Condition Pushdown

…, index condition pushdown. Let’s have a look at the EXPLAIN output: mysql> EXPLAIN SELECT * FROM cast_info WHERE role_id = 1 and note… the ICP optimization: mysql> EXPLAIN SELECT role_id FROM cast_info WHERE role_id = 1 and note like ‘%Jaime%’\G *************************** 1. row *************************** id: 1 select…

Post: Using any general purpose computer as a special purpose SIMD computer

…purposes. Love one another and let’s solve all the complex problems …such a degree. mysql> select min(id),max(id) from words; +———+———+ | min(id) | max(id) | +———+———+ | 1 | 3088896 | …NUMBER_TO_FACTOR}/prime_number) from dataset where id between 1 and 1024 ) parallel_work;…