Category: TalkingData

Foreign-key pre-join (JOIN Simplification and Acceleration Series 6)

Let’s move on to look at how to increase JOIN query performance by making use of certain features of JOINs. As this involves lots of details, we’ll just list some easy-to-understand cases. You can find the complete illustrations in Performance Optimization e-book and related articles in https://c.scudata.com. Let’s begin from the in-memory foreign-key-based join operations:Here are two tables: In which the cid field in the orders table is the foreign key pointing to id field, the customer table’s primary key. To find out the total orders amount in each city (to make the discussion simpler, we won’t specify any condition), we

...