From: | Alexander Farber <alexander(dot)farber(at)gmail(dot)com> |
---|---|
To: | |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Not sure which part of the query needs optimization |
Date: | 2019-01-10 13:48:15 |
Message-ID: | CAADeyWi0nMqR3H_jxP=SugLsTwt06US=geu=DsR0+x3-9=fNNA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you for the comments, Andrew -
On Mon, Jan 7, 2019 at 8:40 PM Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
wrote:
> The obvious thing to do is to keep a computed average score for each
> user - either in a separate table which you update based on changes to
> words_moves, which you could do with a trigger, or using a materialized
> view which you refresh at suitable intervals (this has the drawback that
> the data will not be immediately up-to-date).
>
> Combining these two changes should get you to under 100ms, maybe.
>
>
I was considering creating a cronjob, but now I will better create a
trigger as you have suggested
Regards
Alex
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2019-01-10 14:13:51 | Re: jdbc PGCopyOutputStream close() v. endCopy() |
Previous Message | Dave Cramer | 2019-01-10 13:09:22 | Re: jdbc PGCopyOutputStream close() v. endCopy() |