May 23, 2012

Post: COUNT(*) vs COUNT(col)

…=latin1 mysql> select count(*) from fact; +———-+ | count(*) | +———-+ | 7340032 | +———-+ 1 row in set (0.00 sec) mysql> select count(val) from fact; +————+ | count(val) | +————+ | 7216582 | +————+ 1 row in set (1.17 sec) mysql> select count(val2) from fact; +————-+ | count(val2…

Post: InnoDB vs MyISAM vs Falcon benchmarks - part 1

… NOT NULL default ’0′, PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`), KEY `country_id` (`country_id`,`state_id`,`city`) ) In this benchmark we used… in Part 2). There MyISAM shows bad scalability with increasing count of thread. I think the reason is pread system call….85 times. READ_PK_RANGE_INDEX Query: SELECT count(id) FROM $tableName WHERE id between %d and %d MyISAM scales good here, because…

Comment: COUNT(*) for Innodb Tables

… +—————+————–+——+—–+———+—————-+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | id_acct | int(11) | NO | MUL | 0 | | mysql> select count(id_acct) from awm_messages; +—————-+ | count(id_…’s due to the difference in field type (bigint vs int…

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…: SIMPLE table: goods type: ref possible_keys: cat_id,cat_id_2 key: cat_id_2 key_len: 8 ref: const,const rows… hint. The other problem you may have however is calculating count of matching rows which may be even trickier to slow…

Post: PBXT benchmarks

… tested only READ queries, similar to ones in benchmark InnoDB vs MyISAM vs Falcon (http://www.mysqlperformanceblog.com/2007/01/08/innodb… NOT NULL default ’0′, PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`), KEY `country_id` (`country_id`,`state_id`,`city`) ) In this benchmark we used… access to data. READ_PK_RANGE_INDEX Query: SELECT count(id) FROM $tableName WHERE id between %d and %d The same comment as…

Post: Identifying the load with the help of pt-query-digest and Percona Server

…number of tmp tables created in memory vs on-disk, percentage of queries that needed…pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 149 # Exec time 3 281ms … AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships …

Post: Modeling InnoDB Scalability on Multi-Core Servers

… blog post on InnoDB-vs-MyISAM benchmarks that Oracle recently published prompted me…” width=”300″ caption=”Read-Only Results”][/caption] [caption id=”attachment_4656″ align=”aligncenter” width=”300″ caption=”…core counts. It would be great if the benchmark were re-run with the same core counts and…

Post: Analyzing air traffic performance with InfoBright and MonetDB

…www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236&DB_Short_Name=On-Time about USA… both databases: -Q1: Count flights per day from 2000 to 2008 years SELECT DayOfWeek, count(*) AS c FROM…: Conclusions: This experiment was not really about InfoBright vs MonetDB comparison. My goal was to check how…

Comment: COUNT(*) vs COUNT(col)

How about select count(1) vs select count(id) Which one is better?

Post: InnoDB: look after fragmentation

… is (Q1): SELECT count(distinct username) FROM tracker where TIME_ID >= ’2009-07-20 00:00:00′ AND TIME_ID = ’2009-07-20… getting slow now, as we made key “block_id” inserted not in order. +—————————+ | count(distinct username) | +—————————+ | 5903053 | +—————————+ 1 row in set (2…