skip to Main Content

Postgresql – How to improve sort performance in a huge dataset of 20 million rows?

So I have this query which is extremely slow to run - SELECT "conversation".*, "teamBotLocation"."id" AS "teamBotLocation.id", "teamBotLocation"."name" AS "teamBotLocation.name" FROM "conversation" AS "conversation" LEFT OUTER JOIN "teamBotLocation" AS "teamBotLocation" ON "conversation"."teamBotLocationId" = "teamBotLocation"."id" WHERE "conversation"."teamBotId" = 'some_id' AND "conversation"."teamBotLocationId"…

VIEW QUESTION

Why PostgreSQL doesn't use an index for JOIN

I have two tables "Tasks"(300k rows) and "TaskAssignedRoles"(500k rows). CREATE TABLE public."Tasks" ( "ID" uuid NOT NULL, "RowID" uuid NOT NULL, "Planned" timestamptz NOT NULL, CONSTRAINT "pk_Tasks" PRIMARY KEY ("RowID") ); CREATE INDEX "idx_Tasks_ID" ON public."Tasks" USING btree ("ID"); CREATE…

VIEW QUESTION
Back To Top
Search