Skip to content
Advertisement

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 access and am even restricted to seeing

Optimising query with multiple selects as columns

I have a query I made: The results table has 25000 entries and it takes around 7 seconds to do this query, which is far too long. The query is incredibly inefficient as each column I’m creating is searching again on the same table but with different conditions. I tried indexing the columns of interest in my where clause. This

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&&b =

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

Advertisement