Sample Header Ad - 728x90

How can I optimize the integration between Oracle and GridDB when joining large tables

0 votes
1 answer
39 views
I’m currently working on integrating GridDB with Oracle 19c for a data-intensive application. The goal is to store some time-series data in GridDB while performing complex ETL processes and queries in Oracle. One of the Oracle tables is partitioned and contains over 500 million records. The query performance is significantly slower than expected, even with indexing and partitioning. Here’s a simplified version of the query I’m running in Oracle 19c that also pulls data from GridDB via an API: SELECT t1.customer_name, t2.product_name, SUM(t1.amount), gdb.stock_price FROM transactions t1 JOIN products t2 ON t1.product_id = t2.product_id JOIN (SELECT * FROM TABLE(griddb_stock_price_api())) gdb ON t1.product_id = gdb.product_id WHERE t1.transaction_date BETWEEN TO_DATE('2023-01-01', 'YYYY-MM-DD') AND TO_DATE('2023-12-31', 'YYYY-MM-DD') GROUP BY t1.customer_name, t2.product_name, gdb.stock_price; **Data Details:** **transactions (Oracle):** **customer_name:** Name of the customer making the transaction. **product_id:** The ID of the product being purchased. **amount:** The transaction amount. **transaction_date:** The date the transaction was made (partitioned by date). **products (Oracle):Data Details:** **transactions (Oracle):** **customer_name**: Name of the customer making the transaction. **product_id:** The ID of the product being purchased. **amount**: The transaction amount. **transaction_date:** The date the transaction was made (partitioned by date). **products (Oracle):** **product_id:** The ID of the product. **product_name:** The name of the product. **griddb_stock_price_api() (GridDB):** This API function retrieves real-time stock price data from GridDB. **product_id:** The product ID linked to the stock price. **stock_price:** The current stock price for the product. **product_id:** The ID of the product. **product_name:** The name of the product. **griddb_stock_price_api() (GridDB):** This API function retrieves real-time stock price data from GridDB. **product_id:** The product ID linked to the stock price. **stock_price:** The current stock price for the product.
Asked by Zaigham Ali Anjum (9 rep)
Oct 2, 2024, 10:20 AM
Last activity: Oct 8, 2024, 06:31 AM