Re: [PERFORM] Unexpected expensive index scan

2016-09-28 Thread Jake Nielsen
On Wed, Sep 28, 2016 at 6:04 AM, Tom Lane wrote: > [ Please don't re-quote the entire damn thread in each followup. Have > some respect for your readers' time, and assume that they have already > seen the previous traffic, or could go look it up if they haven't. > The point of quoting at all is j

Re: [PERFORM] Unexpected expensive index scan

2016-09-27 Thread Jake Nielsen
On Tue, Sep 27, 2016 at 6:24 PM, Jake Nielsen wrote: > > > On Tue, Sep 27, 2016 at 6:03 PM, Jake Nielsen > wrote: > >> >> On Tue, Sep 27, 2016 at 5:41 PM, Mike Sofen wrote: >> >>> *From:* Jake Nielsen*Sent:* Tuesday, September 27, 2016 5:22 PM &

Re: [PERFORM] Unexpected expensive index scan

2016-09-27 Thread Jake Nielsen
On Tue, Sep 27, 2016 at 6:03 PM, Jake Nielsen wrote: > > On Tue, Sep 27, 2016 at 5:41 PM, Mike Sofen wrote: > >> *From:* Jake Nielsen*Sent:* Tuesday, September 27, 2016 5:22 PM >> >> >> the query >> >> SELECT * FROM SyncerEvent WHERE ID > 12

Re: [PERFORM] Unexpected expensive index scan

2016-09-27 Thread Jake Nielsen
On Tue, Sep 27, 2016 at 5:41 PM, Mike Sofen wrote: > *From:* Jake Nielsen*Sent:* Tuesday, September 27, 2016 5:22 PM > > > the query > > SELECT * FROM SyncerEvent WHERE ID > 12468 AND propogatorId NOT IN > ('"d8130ab9!-66d0!-4f13!-acec!-a9556362f0ad&q

Re: [PERFORM] Unexpected expensive index scan

2016-09-27 Thread Jake Nielsen
Herp, forgot to include the query: SELECT * FROM SyncerEvent WHERE ID > 12468 AND propogatorId NOT IN ('"d8130ab9!-66d0!-4f13!-acec!-a9556362f0ad"') AND conflicted != 1 AND userId = '57dc984f1c87461c0967e228' ORDER BY ID LIMIT 4000;^ On Tue, Sep 27, 2016 at 5:02

[PERFORM] Unexpected expensive index scan

2016-09-27 Thread Jake Nielsen
I've got a query that takes a surprisingly long time to run, and I'm having a really rough time trying to figure it out. Before I get started, here are the specifics of the situation: Here is the table that I'm working with (apologies for spammy indices, I've been throwing shit at the wall)