June 19, 2013

Post: Shard-Query EC2 images available

…NULL, KEY `date_id` (`date_id`), KEY `flight_id` (`flight_id`), KEY `origin_airport_id` (`origin_airport_id`), KEY `dest_airport_id` (`dest_airport_id`), KEY `DepDelay` (`…to run workers on them. Generate a cluster configuration There is a script provided to generate the shards.ini file for testing…

Post: Adventures in archiving

… engine. Tooling The tooling phase consisted of producing scripts to generate representative payloads for comparison, in this case this would be… good performance. e.g. mysql> select id from archive_table order by id desc limit 1; +———+ | id | +———+ | 1143883 | +———+ 1 row in set (2…

Comment: ORDER BY ... LIMIT Performance Optimization

… thus generating no output at all. Some ppl suggested to run the query backwards and forwards. i.id (smaller-equal) a.id and the i.id (greater) a.id This brings trouble as well because the random number is generated inside…. This can be overcome by making a pre-query to generate a random number in your application, still leaving you with…

Post: Quickly finding unused indexes (and estimating their size)

… recommend you manually review the list of unused indexes being generated above before you simply drop them. Depending on your sensitivity…_fk_address_id | +————–+—————+—————————–+ 23 rows in set (0.02 sec) From here I can use some clever SQL to generate the precise…

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

… it, and then I create one, the following warning is generated: mysql> alter table dir_test_innodb ADD FULLTEXT KEY (full… | +———+——+————————————————–+ | Warning | 124 | InnoDB rebuilding table to add column FTS_DOC_ID | +———+——+————————————————–+ This doesn’t make a lot of sense to me… value of an ID column that you defined for the underlying table, or it can be a sequence value generated by InnoDB…

Post: Using index for ORDER BY vs restricting number of rows.

…` decimal(10,2) NOT NULL, KEY `cat_id` (`cat_id`,`price`), KEY `cat_id_2` (`cat_id`,`seller_id` ) mysql> explain select * from goods where… with seller_id being not really selective it is likely it will need to scan less than 100 rows to generate result… may be even trickier to slow for complex searches which generate a lot of rows. Another interesting technique is to use…

Post: What time 18446744073709550.000 means

… if we use: start_time = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp); … query_execution … end_time = clock_gettime(CLOCK_THREAD_CPUTIME… on the same motherboard uses different frequency generators (each CPU has its own frequency generator, though exact implementation depends on CPU vendor…

Comment: Conflict Avoidance with auto_increment_increment and auto_increment_offset

… auto_increment_offset = 2 // id of master example if have 3 servers for server 1, this server generate ids 1,4,7,10,etc.. auto_increment_increment = 3 auto_increment_offset = 1 for server 2, this server generate ids 2,5,8,11,etc.. auto_increment_increment = 3 auto_increment_offset = 2 for server 2, this server generate ids 3…

Post: Introducing new type of benchmark

… all are idle until asked to handle a request Benchmarks generates transactions with a given rate, i.e. M transactions per… sec, but 0.5 is the mean of this random generation function. On the graph you see 20 events arrived within…,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=”//platform.twitter.com/widgets.js…

Post: Goal driven performance optimization

… Optimization. Lets assume our performance goal applies to the HTML generation rather than full page load on the client. So meet…, which is pages which take more than 1 second to generate in given example. For goal driven performance optimization it is… are causing it – this can be done by adding request ID as comment to Sphinx log so you can profile it…