I have the following query, and because of a lot of SUM function calls, my query is running too slow. I have a lot of records in my database and I would like to get
SUM
To improve the speed of SQL query, you must add indexes. For each joined table, you have to add one index.
Like this code example for oracle:
CREATE INDEX supplier_idx ON supplier (supplier_name);