Skip to content

Tag: indexing

Joining Temp Tables Using Indexes

I’m just beginning to learn about INDEX and I’ve heard it could speed up results but my testing is having the opposite effect. Some points about the data: My company uses a SQL Server but I don’t know much else beyond that I’m just an employee and don’t have any sort of admin acc…

Index and hasmap

In order to ask my question I first need to explain my understanding of both concepts. Actually, my understanding is very vague, so stop me if I’m wrong. Index (btree in SQL): An index is helpful …

Can SQL with CASE condition use index in PostgreSQL?

When I write a SQL like SELECT * FROM table WHERE table.col && object, I could use the index I built (as it support && operator), but with It seems I can’t use the index? What is the reason of this? Is there any way to solve it? Actually I want to implement a logic like CASE WHEN a&&…

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 v…