Skip to content

Tag: performance

MySql improve GROUP BY ORDER BY query with index

I have a table like this: the goal is to query how many products have been sold per day, so the query is: The output is: Ok. Now let us suppose we have a scenario with several records and this query has to be run several times per day, we need to care about performance now in order to retrive

SQL Join – Limit to base table

I have 4 tables that I want to link together based on the information in the sales_details table which will serve as the base table (limiting results based on the sales_details table) 1)I want to pull all columns from the sales_detail table that are mastercard orders but since the sales_detail table doesn&#82…

Trying to work out why my query is sluggish

So I have this query in C#, it takes about 3.6 seconds to complete. Here is both table designs Product review table: Review Table: I did have my where clause like so, but made no difference: I’m not sure why it’s slow, does anyone have advice to speed it up? Thanks More Info: Both tables have 6069…