Skip to content

Success story.

Query Optimization

The company processes merchant payments based on credit, debit, and prepaid card transactions, consolidating them on an on-premises database. As part of their digital transformation, they migrated the transaction lifecycle to AWS (BUT), using Amazon Athena for queries. However, the private customer portal required immediate response times that Athena couldn't meet due to the high volume of aggregated data.

Image for the Query Optimization case

We take on any challenge

At Zenta there are no obstacles we cannot overcome.

  • Challenge

    Reduce the response time of complex queries from an average of 21 seconds to less than 1 or 2 seconds at most. The goal was to execute these queries "on the fly" (in real time) for the customer portal, avoiding the use of preprocessing or materialized views whenever possible.

  • Solution

    The strategy focused on logically optimizing tables through advanced configuration of composite Distribution Keys and Sort Keys, as well as applying automatic column compression to reduce disk I/O load.

Results from our management

  • Reduction of response time in queries on 322 million records from 21 seconds to less than 0.5 seconds (357 ms).

  • In specific consultations by period, times of 82 ms were achieved compared to the 26 minutes it previously took.

  • By using materialized views on query templates, times were reduced to just 35 milliseconds.