sql server – Optimizing MySQL query with INNER JOINS, LEFT JOINS, GROUP BY and HAVING

I’m having trouble optimizing this really big query and I can’t change the table structure except creating additional indexes and small adjustments. SELECT ‘Fattura Prodotti Postali’ AS `type`, SUM(dpd.qta) AS `products_count_quantity`, COUNT(dpd.IDlavorazione_dett) AS `products_count`, dpd.IDlavorazione_dett AS `IDlavorazione_dett`, dp.prod_totali- CAST(dp.opzione1 AS UNSIGNED) AS `process_products_count`, dp.IDdistinta AS `product_code`, dp.data_distinta AS `process_date`, dp.IDesito AS `process_status_id`, dp.note AS `process_note`, … Read more

Five Tips to Fasten Skewed Joins in Apache Spark

Joins are one of the most fundamental transformations in a typical data processing routine. A Join operator makes it possible to correlate, enrich and filter across two input datasets. The two input datasets are generally classified as a left dataset and a right dataset based on their placement with respect to the Join clause/operator. Fundamentally, … Read more

Improving Performance in a Hierarchical SQL Structure

This article will show how column propagation can represent a straightforward approach to improving query performance when dealing with a hierarchical data structure. We’ll do this with a real-world scenario based on a data-driven project involving a live data website developed for a startup operating in the sports industry. You’ll learn everything you need to … Read more