Re: [PERFORM] Speed differences between in executing the same query

2017-05-11 Thread plukovic
Thank you very much Tom. This is very helpful. -- View this message in context: http://www.postgresql-archive.org/Speed-differences-between-in-executing-the-same-query-tp5960964p5961041.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com. -- Sent via pgsql-performa

Re: [PERFORM] Speed differences between in executing the same query

2017-05-11 Thread Tom Lane
plukovic writes: > I have a weird case of query execution performance here. My first thought is that you are getting a bad plan because of this estimation error: > -> Index Scan using uk_TBL_sk0_account_code on TBL_sk > sk2_ (cost=0.14..12.53 rows=1 width=426) (actual time=

[PERFORM] Speed differences between in executing the same query

2017-05-11 Thread plukovic
I have a weird case of query execution performance here. The query has a date values in the WHERE clause, and the speed of executing varies by values of the date. Actualy, - for the dates from the range of the last 30 days execution takes aruond 3 min - for the dates before the range of the las