Re: [PERFORM] Querying with multicolumn index

2016-12-09 Thread Tom Lane
Eric Jiang writes: > I have a query that I *think* should use a multicolumn index, but > sometimes isn't, resulting in slow queries. I tried to duplicate this behavior, without success. Are you running with nondefault planner parameters? regards, tom lane -- Sent via

Re: [PERFORM] Querying with multicolumn index

2016-12-09 Thread Eric Jiang
On Fri, Dec 9, 2016 at 9:56 AM, Andreas Joseph Krogh wrote: > You should be having this index: > > create index updates_driver_time_idx ON updates(driver_id, "time" *DESC)*; > I'm not sure I understand the intent of this fix - are you saying that btree indexes only work in a certain direction?

Re: [PERFORM] Querying with multicolumn index

2016-12-09 Thread Andreas Joseph Krogh
På fredag 09. desember 2016 kl. 18:00:16, skrev Eric Jiang mailto:e...@doublemap.com>>: Hi all, I have a query that I *think* should use a multicolumn index, but sometimes isn't, resulting in slow queries. We have a DB that records GPS coordinates for vehicles:                                

Re: [PERFORM] performance issue with bitmap index scans on huge amounts of big jsonb documents

2016-12-09 Thread Merlin Moncure
On Wed, Nov 30, 2016 at 6:26 AM, Marc-Olaf Jaschke wrote: > Hi, > > i have a performance issue with bitmap index scans on huge amounts of big > jsonb documents. > > > = Background = > > - table with big jsonb documents > - gin index on these documents > - queries using index conditions wi

[PERFORM] Querying with multicolumn index

2016-12-09 Thread Eric Jiang
Hi all, I have a query that I *think* should use a multicolumn index, but sometimes isn't, resulting in slow queries. We have a DB that records GPS coordinates for vehicles: Table "public.updates" Column | Type | Modifie