Showing entries 1 to 3
Displaying posts with tag: SPJ (reset)
Working Around MySQL Cluster Push Down Limitations Using Subqueries

I worked on an issue last recently where a query was too slow when executed in MySQL Cluster. The issue was that Cluster has some restrictions when it comes to push down conditions.

As an example of this, consider the following query using the employees sample database. The query takes a look at the average salary based on how many years the employee has been with the company. As the latest hire date in the database is in January 2000, the query uses 1 February 2000 as the reference date.

Initially the query performs like (performance is with two data nodes and all nodes in the same virtual machine on a laptop, so the timings are not necessarily representative of a production system, though the improvements should be repeatable):

mysql> SELECT FLOOR(DATEDIFF('2000-02-01', hire_date)/365) AS LengthOfService,
              COUNT(DISTINCT employees.emp_no) AS NoEmployees, AVG(salary) AS AvgSalary
         FROM salaries …
[Read more]
Trying out MySQL Push-Down-Join (SPJ) preview

At the 2010 MySQL User Conference, Jonas Oreland presented on the work he’s been doing on improving the performance of joins when using MySQL Cluster – the slides are available for download. While not ready for production systems, a preview version is available for you to try out. The purpose of this blog is to step through  testing an example query as well as presenting the results (SPOILER: In one configuration, I got a 50x speedup!).

SPJ is by no means complete and there are a number of constraints as to which queries benefit (and I’ll give an example of one that didn’t). For details of the current (April 2010) software and limitations, check out …

[Read more]
MySQL Cluster - SPJ Preview - Feedback welcome

SPJ (preview, not production ready) is a new feature allowing some types of JOINs to be pushed down and executed inside the data nodes! This allows for, in many cases, much faster JOIN execution.

Now we would love to get your feedback on this new feature:

  • Does what we have right now improve performance for you?
  • Are there other types of JOINs we should support in order to improve performance in you application (currently only eq_ref is supported)?
  • What application are you using?

There are some limitations currently:

  • node failure handling of SPJ is not complete, so if a data node crash, there are side-effects.
  • only eq_ref is supported - other JOINs are executed as normal.
  • Don't put this in production.

Obtaining the MySQL Cluster SPJ preview version:

  • You must know how to build MySQL Cluster …
[Read more]
Showing entries 1 to 3