I have database with few hundred millions of rows. I'm running the following
query:
select * from "Payments" as p
inner join "PaymentOrders" as po
on po."Id" = p."PaymentOrderId"
inner join "Users" as u
On u."Id" = po."UserId"
INNER JOIN "Roles" as r
on u."RoleId" = r."Id"
Where r."Name" = 'Moses'
LIMIT slowing down queries. Let's
hope it will be fixed someday :)
Date: Fri, 16 Nov 2012 08:32:24 -0800
Subject: Re: [PERFORM] PostgreSQL strange query plan for my query
From: cja...@emolecules.com
To: dato0...@ho
will be fixed
someday :)
Date: Fri, 16 Nov 2012 08:32:24 -0800
Subject: Re: [PERFORM] PostgreSQL strange query plan for my query
From: cja...@emolecules.com
To: dato0...@hotmail.com
CC: pgsql-performance@postgresql.org
On Fri, Nov 16, 2012 at 3:40 AM, David Popiashvili wrote:
I have databa
On Fri, Nov 16, 2012 at 3:40 AM, David Popiashvili wrote:
> I have database with few hundred millions of rows. I'm running the
> following query:
>
> select * from "Payments" as pinner join "PaymentOrders" as poon po."Id" =
> p."PaymentOrderId"inner join "Users" as uOn u."Id" = po."UserId"INNER J
ot;Id"
JOIN "PaymentOrders" AS po ON po."UserId" = u."Id"
JOIN "Payments" AS p ON p."PaymentOrderId" = po."Id"
WHERE r."Name" = 'Moses'
) x
LIMIT 1000;
but this solution also generates incorrec
SELECT * FROM "Roles" AS r JOIN "Users"
AS u ON u."RoleId" = r."Id" JOIN "PaymentOrders" AS po ON po."UserId"
= u."Id" JOIN "Payments" AS p ON p."PaymentOrderId" =
David Popiashvili wrote:
> I have database with few hundred millions of rows. I'm running the
following query:
>
> select * from "Payments" as p
> inner join "PaymentOrders" as po
> on po."Id" = p."PaymentOrderId"
> inner join "Users" as u
> On u."Id" = po."UserId"
> INNER JOIN "Roles" as r
> on u
I have database with few hundred millions of rows. I'm running the following
query:
select * from "Payments" as p
inner join "PaymentOrders" as po
on po."Id" = p."PaymentOrderId"
inner join "Users" as u
On u."Id" = po."UserId"
INNER JOIN "Roles" as r
on u."RoleId" = r."Id"
Where r."Name" = 'Moses