BigDataIA-Spring2023-Team-03 / Assignment3

0 stars 0 forks source link

Optimize Analytics by Consolidating SQL Queries and Leveraging Pandas DataFrames #7

Open KaranAgrawal1509 opened 1 year ago

KaranAgrawal1509 commented 1 year ago

Context:

Currently, the developer is using multiple SQL queries to retrieve different analytics data from the table responsible for analytics. This approach can lead to increased database pings and potential performance issues as the number of queries increases. To optimize this process, we propose using a single SQL query to fetch the required data and then performing the necessary operations on a Pandas DataFrame.

Solution:

To implement this optimization, we suggest consolidating the multiple SQL queries into one query that fetches all the necessary data from the analytics table. Once the data is retrieved, we can utilize Pandas DataFrames to perform the rest of the operations, reducing the number of pings to the database and improving overall performance.

Expected Behavior:

After implementing this change, the analytics data retrieval process should be more efficient and result in fewer database pings. The overall performance of the analytics functionality should improve without any noticeable changes in the user experience.

Steps to Implement:

Conclusion

By consolidating SQL queries and leveraging Pandas DataFrames, we can optimize the analytics data retrieval process, reducing database pings and improving the overall performance of our web application.

JaredVidelefsky commented 1 year ago

Thanks, Noted etc