May 26, 2012

Post: MySQL: Followup on UNION for query optimization, Query profiling

… status; Query OK, 0 rows affected (0.00 sec) mysql> SELECT sql_no_cache name FROM people WHERE age BETWEEN 18 and… 10) UNION ALL (select * from people where age=19 order by last_online desc limit 10) UNION ALL (select * from people where age=20 order by last_online desc limit 10) ORDER BY last_online…

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

… as `StateName` , OriginWac as `Wac` FROM ontime_stage UNION select Dest as `airport_code`, DestCityName as `CityName`, …. This VM was rebooted between tests. A SQL script was fed to the run_query… BY Carrier ORDER BY c DESC; — Q5 SELECT t.Carrier, c, c2, c*1000/c2 as c3 FROM (SELECT Carrier,…

Post: Distributed Set Processing with Shard-Query

…. This allows BETWEEN, IN, subqueries in the FROM clause, and UNION operations to operate fully in parallel. Distributed set processing is….date_id) WHERE dim_date.Year IN (2009) GROUP BY 1 ORDER BY NULL ) — AGGREGATION SQL: SELECT `origin_airport_id`, SUM(`count(*)`) AS `count(*)`, SUM…

Comment: Duplicate indexes and redundant indexes

sqlSELECT a.table_schema, a.table_name, a.constraint_name, a.constraint_type, convert(group_concat(DISTINCT b.column_name ORDER BYBY a.table_schema, a.table_name, a.constraint_name, a.constraint_type, b.referenced_table_name, b.referenced_column_name UNION SELECT