Question : We have a database table and we found a weird query from old code. We can’t really explain […]
Category: Query Performance
Fetch correct stats from database
Question : I am trying to get count of all quiz users who have made purchases. Main table for storing […]
Querying a table with 200+ million rows by filtering on the clustered index AND additional column is super slow
Question : We have one table that has clustered index on two columns: first one is NVARCHAR(50) and second one […]
Designing a table for large amount of rows. No relationships
Question : I am looking to design a database that’ll allow me to store references to files. The table is […]
Efficiently query MAX over multiple ranges
Question : When performing a MIN() or MAX() over a single range covered by an appropriately sorted index, SQL Server […]
Update queries slower after enabling SQL Server Full-Text Index
Question : I have an asp.net website with many insert, update, and delete queries running against my database. A few […]
Index lost while joining on union
Question : I read a lot about indexes/unions but can’t get to the bottom of this. I have here a […]
Best way to store few rows of data every minute without creating 1440 columns a day?
Question : I will be calling a server that returns some JSON data every minute. The values are along the […]
PostgreSQL incorrectly using primary key index for min/max query
Question : I have a table with the structure similar to this: CREATE TABLE employees ( id bigserial NOT NULL, […]
Select data based on records created_at column
Question : I have two tables Keywords, ProjectReports: http://sqlfiddle.com/#!15/06ae3/1 As you can see in that example everything works fine, but […]