June 18, 2013

Post: The Optimization That (Often) Isn't: Index Merge Intersection

…id > 2938575 AND parent_id=0 AND status=1 ORDER BY user_id LIMIT 1\G *************************** 1. row *************************** id: 1 select_type: SIMPLE … and suddenly start believing that they can always outsmart the optimizer by manually manipulating indexes in every query they write (not …

Post: Join Optimizations in MySQL 5.6 and MariaDB 5.5

… is MRR Key-ordered Scan. Let’s see what this optimization actually is. Key-ordered Scan for BKA With this optimization the idea of…_shipdate > ’1995-03-09′ group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate LIMIT 10; In-memory workload Now let’s see how effective are the join optimizations when the…

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

… exactly happens during query execution – very helpful for MySQL Performance optimization: mysql> flush status; Query OK, 0 rows affected (0.00…=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 desc limit

Post: Thinking about running OPTIMIZE on your Innodb Table ? Stop!

…look at little benchmark I done by running OPTIMIZE for a second time on a …=latin1 mysql> select * from a order by id limit 10; +—-+——————————————+ | id | c | +—-+——————————————+ | 1 | 813cf02d7d65de2639014dd1fb574d4c481ecac7 | | 2 | …

Comment: Using delayed JOIN to optimize count(*) and LIMIT queries

… trade ! I believe the optimizer should be able to move ORDER BY and LIMIT around inside the execution plan by itself but since it isn… table. – since i use ORDER BY + LIMIT, I can then compute the max() or min() (depending on the order) or the relevant row – then… I know that rows which have the ORDER BY field greater (or lower depending on the order) to the value computed above will…

Post: Database access Optimization in Web Applications.

… common killer queries are GROUP BY Queries and Sort Queries – SELECT name,descr FROM titles ORDER BY rank DESC LIMIT 10 – If there is… result set just because schema is not optimally indexed – this is easy. For example our ORDER BY rank query is such – adding index… doing so by several queries, assuming this query would not need to analyze much more rows because it is optimized differently. One…

Post: Optimizing slow web pages with mk-query-digest

… top slowest sessions: mk-query-digest –group-by=Thread_id –order-by=Query_time:sum in > out Spot on,…item is included in the report because it matches –limit. # Scores: Apdex = 0.97 [1.0], V/M =… better than that would be if it would optimize the queries all together! Unfortunately mk-query-digest…

Comment: Using delayed JOIN to optimize count(*) and LIMIT queries

… trade ! I believe the optimizer should be able to move ORDER BY and LIMIT around inside the execution plan by itself but since it isn… table. – since i use ORDER BY + LIMIT, I can then compute the max() or min() (depending on the order) or the relevant row – then I query the archive table, but I know that rows which have the ORDER BY field…

Comment: ORDER BY ... LIMIT Performance Optimization

[...] BY I already wrote about ORDER BY LIMIT Optimization so I will not repeat it here. In the nutshell ORDER BY LIMIT can be very fast… if it is done [...]

Comment: ORDER BY ... LIMIT Performance Optimization

…«kāk par Order by un Limit klauzas veiktspÄ“jas uzlaboÅ¡anas iespÄ“jām var lasÄ«t MySQL Performance Blogā ORDER BYLIMIT Performance Optimization.  [...]