Re: Very slow 101-feeling design/query..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wells Oliver <wells.oliver@xxxxxxxxx> writes:
> PG 13.4. Can't quite run the EXPLAIN ANALYZE since it takes so long, but
> EXPLAIN SELECT DISTINCT game_id FROM vw_joints shows (s = joints, p = plays)

I doubt you're going to get a query plan that's significantly better
than what you show here.  But those tables are pretty large, so
I wonder whether you have cranked up work_mem.

One potential issue is that the planner thinks there are only
about 1829 distinct game_id values:

>  HashAggregate  (cost=63810150.11..63810168.40 rows=1829 width=4)
>    Group Key: p.game_id

Is that about the right size of result for this?

			regards, tom lane





[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux