I have a database with a few million posts, each with a column “content” that contains the post content in plain HTML.
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
What is difference between `flag is TRUE` vs `flag = TRUE` in MySQL?
I ran the following queries in MySQL – Time taken = 1 second. vs Time taken = 66 ms. I have indexes on (valid, priority) and (valid). Why is there such a huge difference? What is the difference between Is TRUE vs = TRUE ? Answer As per the Mysql Doc for IS operator IS boolean_value Tests a value against
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 =
query for trunc(date) on a view that already filters for date
We’re accessing a view from another team’s database and to make it a lot simpler, the view looks a bit like this: create view x_view as select x.exec_time, … from stuff x where x.exec_time &…
SQL Column ID value jumps 10000 times
The ID column index jumps 10000 times. For example: From index : 5 goes to 10006 and the continues 10007 , 10008 , 10009 and then goes to 20003 , 20004 …. How I could fix the ID values and …
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
Is it a performance problem to start add sequential GUIDs in table with non sequential GUIDs
I have tables with primary key uniqueidentifier type and add non sequential ids, now I want just to start adding only sequential ids in this tables. The guid generation is made in the code. Is it possible this to create problems in the indexes of the previous data. Logically I don’t see any problem, but I can’t find any information