Tag - Optimizer

When the subselect runs faster

A few weeks ago, we had a query optimization request from one of our customer.
The query was very simple like:

Shell

SELECT * FROM `table` WHERE (col1=’A’||col1=’B’) ORDER BY id DESC LIMIT 20 OFFSET 0

1

SELECT * FROM `table` WHERE (col1=’A’||col1=’B’) ORDER BY id DESC LIMIT 20 OFFSET 0

This column in the table is looks like this:

Shell

`col1` […]

Read more

Getting around optimizer limitations with an IN() list

There was a discussion on LinkedIn one month ago that caught my eye:

Database search by “within x number of miles” radius?
Anyone out there created a zipcode database and created a “search within x numer of miles” function ?
Thankful for any tips you can throw my way..
J

A few people commented that some solutions wouldn’t scale. […]

Read more

A micro-benchmark of stored routines in MySQL

Ever wondered how fast stored routines are in MySQL? I just ran a quick micro-benchmark to compare the speed of a stored function against a “roughly equivalent” subquery. The idea — and there may be shortcomings that are poisoning the results here, your comments welcome — is to see how fast the […]

Read more

High-Performance Click Analysis with MySQL

We have a lot of customers who do click analysis, site analytics, search engine marketing, online advertising, user behavior analysis, and many similar types of work.  The first thing these have in common is that they’re generally some kind of loggable event.
The next characteristic of a lot of these systems (real or planned) is […]

Read more