Re: [PERFORM] limit 1 on view never finishes

2016-11-02 Thread Jim Nasby
On 10/27/16 3:46 PM, Craig James wrote: Limit (cost=3264.63..7193.14 rows=1 width=4) -> Nested Loop (cost=3264.63..428658697.57 rows=109114 width=4) Join Filter: (rv.version_id = sample.version_id) -> Index Only Scan Backward using version_pkey on version rv (cost=0.42

[PERFORM] limit 1 on view never finishes

2016-10-27 Thread Craig James
This is a weird problem. A "limit 5" query runs quicky as expected, but a "limit 1" query never finishes -- it just blasts along at 100% CPU until I give up. And this is a join between two small tables (262K rows and 109K rows). Both tables were recently analyzed. This is Postgres 9.3.5 (yes, we'l