Re: [GENERAL] Question slow query

2017-01-27 Thread Tom Lane
John R Pierce writes: > On 1/16/2017 11:27 AM, Patrick B wrote: >> CREATE INDEX CONCURRENTLY ON note (timezone('Etc/UTC'::text, d_date)); > why did you prefix your index with timezone('etc/UTC'::text ??? that > doesn't make sense to me at all. is timezone() some function you've > defined? I'

Re: [GENERAL] Question slow query

2017-01-27 Thread John R Pierce
On 1/16/2017 11:27 AM, Patrick B wrote: Sorry about that.. just wanted to understand how to index a timestamp column. I was able to do this way: CREATE INDEX CONCURRENTLY ON note (timezone('Etc/UTC'::text, d_date)); why did you prefix your index with timezone('etc/UTC'::text ??? that

Re: [GENERAL] Question slow query

2017-01-27 Thread Venkata B Nagothi
On Tue, Jan 17, 2017 at 6:27 AM, Patrick B wrote: > > > 2017-01-12 16:48 GMT+13:00 Andreas Joseph Krogh : > >> På torsdag 12. januar 2017 kl. 03:15:59, skrev Patrick B < >> patrickbake...@gmail.com>: >> >> Hi guys, >> >> I've got a slow query, running at 25 seconds. >> >> >>

Re: [GENERAL] Question slow query

2017-01-16 Thread Patrick B
2017-01-12 16:48 GMT+13:00 Andreas Joseph Krogh : > På torsdag 12. januar 2017 kl. 03:15:59, skrev Patrick B < > patrickbake...@gmail.com>: > > Hi guys, > > I've got a slow query, running at 25 seconds. > > > -> Bitmap Heap Scan on ja_notes r_1103088 > (cost=234300.55.

Re: [GENERAL] Question slow query

2017-01-11 Thread Andreas Joseph Krogh
På torsdag 12. januar 2017 kl. 03:15:59, skrev Patrick B < patrickbake...@gmail.com >: Hi guys,   I've got a slow query, running at 25 seconds.   -> Bitmap Heap Scan on ja_notes r_1103088 (cost=234300.55..1254978.62 rows=553275 width=101) (actual time=1423.411..10