Skip to content
Advertisement

Tag: query-performance

MySQL GROUP BY slows down query x1000 times

I’m struggling with setting up proper, effective index for my Django application which uses MySQL database. The problem is about article table which for now has a little more than 1 million rows and querying isn’t as fast as we want. Article table structure looks more or less like below: After many tries I came that below index gives best

SQL Server Query filter with order is slow

I have been struggling with this for a while. I have a database with three tables (each of which has millions of records) as follows (removed some columns for simplicity): There exists indexes As follows To eliminate the possibility that the slowness is because of the selected columns, I only select a fixed value The following query runs very fast

I wonder using INNER JOIN and equality operator is faster or using IN when I try to filter data from a table by another table’s column

While I’m trying to get all accounts, which received message from foo@gmail.com. I want to know about the performance of two following query. or Thanks! Answer Always use the first query in such situations. Don’t use DISTINCT inside an IN clause subquery, though. Don’t try to tell the DBMS how to perform the IN. (Well, a good DBMS should simply

Advertisement