Akiban Use Cases - Dynamic Profile Search

Profiles are everywhere and they are constantly evolving and expanding. Whether it’s rich insights on a customer or a detailed definition of a product, applications increasingly need to search using complex profiles that can change in real-time. This query pattern performs well at first, but performance quickly degrades as schemas evolve, data volumes grow, and more complex filters are applied.

SELECT          c.customer_id
               ,o.order_id
               ,o.order_date

FROM            customers c

INNER JOIN      addresses a
       ON       a.customer_id = c.customer_id
LEFT JOIN       orders o
       ON       o.customer_id = c.customer_id

WHERE           a.zip_code in ($1)
      AND       c.payment_status = 'C'

ORDER BY        c.customer_name asc

LIMIT           500;

 
Individual columns define the data elements required by the application.
 

Tables are joined to assemble the object
 
 
Predicates applied to 2 or more tables
 
Once the entire set is sorted, return 500 records
 

 

Akiban versus Traditional Relational Systems

As traditional relational systems process the joins in this query, they create a temporary table that needs to be sorted before the results can be projected. This is a slow process, especially under heavy concurrency conditions: 

AkibanVsMySQLExplainPlan_ProfileSearchAnnotated

Akiban’s table grouping eliminates the multiple table accesses and the cost of joins for these queries. Temporary tables and filesorts are also eliminated because Akiban Server can read the first 500 records in sorted order directly from the group index.

Business Value In Context

Faster, richer and more flexible searches for users

More real-time contextual information

Consistent performance, even at high workloads

Higher page views, paid conversion and retention

Lower cost of infrastructure

Akiban table grouping brings game changing query acceleration and scalability to SQL queries. The graph reflects it. Akiban runs the profile search query 27x faster than MySQL; for this company the query execution time was reduced from 2.4 seconds in MySQL to only 89 milliseconds in Akiban. By decreasing your customers’ time to interaction, and in providing them valuable real-time context, your business yields significant benefits.