Re: much slower query in production

From: "MichaelDBA(at)sqlexec(dot)com" <michaeldba(at)sqlexec(dot)com>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: Guillaume Cottenceau <gc(at)mnc(dot)ch>, postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: much slower query in production
Date: 2020-02-26 19:18:31
Message-ID: 69844C34-DF13-46E6-BE7C-C9DABE19D391@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Vacuum everything that you restored

Sent from my iPhone

> On Feb 26, 2020, at 1:19 PM, Michael Lewis <mlewis(at)entrata(dot)com> wrote:
>
> 
>> UPDATE multicards
>> SET defacements = COALESCE( count, 0 )
>> FROM ( SELECT multicard_uid, COUNT(*) AS count FROM tickets GROUP BY multicard_uid ) AS sub
>> WHERE uid = multicard_uid OR multicard_uid is null;
>
> I expect this should work. Not sure of performance of course.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Guillaume Cottenceau 2020-02-26 19:37:48 Re: much slower query in production
Previous Message Michael Lewis 2020-02-26 18:18:53 Re: much slower query in production