Re: [PERFORM] Estimates on partial index

2016-08-19 Thread Victor Yegorov
2016-08-18 21:40 GMT+03:00 Victor Yegorov : > Oh, that's interesting. I was under impression, that r_p_c reflects IO > speed, like — make it smaller for SSDs. > To make this query prefer BitmapScan, I need to bump r_p_c to 5.8. And 6.0 > makes it switch to SeqScan. > I was lo

Re: [PERFORM] Estimates on partial index

2016-08-19 Thread Victor Yegorov
2016-08-18 23:06 GMT+03:00 Jeff Janes : > It does account for them, but perhaps not perfectly. See "[PERFORM] > index fragmentation on insert-only table with non-unique column" for > some arguments on that which might be relevant to you. > Thanks for pointing this out, good stuff to know. If y

Re: [PERFORM] Estimates on partial index

2016-08-18 Thread Victor Yegorov
2016-08-18 18:59 GMT+03:00 Jeff Janes : > Both plans touch the same pages. The index scan just touches some of > those pages over and over again. A large setting of > effective_cache_size would tell it that the page will most likely > still be in cache when it comes back to touch it again, meani

Re: [PERFORM] Estimates on partial index

2016-08-18 Thread Victor Yegorov
2016-08-18 16:56 GMT+03:00 Tom Lane : > In that case you've got random_page_cost too far down. Values less than > the default of 4 are generally only appropriate if the bulk of your > database stays in RAM. > Oh, that's interesting. I was under impression, that r_p_c reflects IO speed, like — ma

[PERFORM] Estimates on partial index

2016-08-18 Thread Victor Yegorov
Greetings. I have a question on why planner chooses `IndexScan` for the following query: SELECT la.loan_id, la.due_date, la.is_current FROM loan_agreements la WHERE la.is_current AND '2016-08-11' > la.due_date; Relevant (cannot post it all, sorry) table definition is:

Re: [PERFORM] query plan question, nested loop vs hash join

2014-10-05 Thread Victor Yegorov
2014-10-05 21:57 GMT+03:00 Andrey Lizenko : > Increasing of 'effective_cache_size' leads to similar thing with > mergejoin, > other options (work_mem, shared_buffers. etc) do not change anything. > I think increasing `work_mem` should have effects, as plan with `Nested Loop` is using disk-based

Re: [PERFORM] after upgrade 8.4->9.3 query is slow not using index scan

2014-09-26 Thread Victor Yegorov
2014-09-26 17:04 GMT+03:00 Matúš Svrček : > I am having a performance issue after upgrade from 8.4.20-1 -> 9.3.5. First, make sure you have your statistics up to date — execute manual `VACUUM ANALYZE`. And then provide `EXPLAIN analyze` for 8.4 and `EXPLAIN (analyze, buffers)` for 9.3 output.

Re: [PERFORM] Very slow running query PostgreSQL 9.3.4

2014-08-28 Thread Victor Yegorov
2014-08-29 7:28 GMT+03:00 Burgess, Freddie : >-> Index Scan using idx_clone_report_query_y201408 on > SARS_IMPACT_REPORT_y2014m08 this__2 (cost=0.57..5570.95 rows=103 > width=136) (actual time=8.300..33308.118 rows=710202 loops=1) > Index Cond: ((model_uid =

Re: [PERFORM] Performance issue: index not used on GROUP BY...

2014-08-28 Thread Victor Yegorov
2014-08-28 14:29 GMT+03:00 gmb : > Unfortunately , I don't have a lot of memory available ( 65 connections , > work_mem = 64MB in pg conf ). > You don't have to change cluster-wide settings here. You can issue `SET` command from your client right before running your query, only your session will

Re: [PERFORM] Performance issue: index not used on GROUP BY...

2014-08-28 Thread Victor Yegorov
2014-08-28 12:08 GMT+03:00 gmb : > GroupAggregate (cost=303425.31..339014.43 rows=136882 width=48) (actual > time=4708.181..6688.699 rows=287268 loops=1) > Buffers: shared read=23899, temp read=30974 written=30974 > -> Sort (cost=303425.31..306847.34 rows=1368812 width=48) (actual > time=47

Re: [PERFORM] Performance issue: index not used on GROUP BY...

2014-08-28 Thread Victor Yegorov
2014-08-28 11:50 GMT+03:00 gmb : > It seems as if the planner is not using the PRIMARY KEY as index which was > my assumption. > Can you send `EXPLAIN (analyze, buffers)` for your query instead? It'll show exactly what's going on. -- Victor Y. Yegorov

Re: [PERFORM] seqscan for 100 out of 3M rows, index present

2013-06-26 Thread Victor Yegorov
2013/6/26 Willy-Bas Loos > postgres does a seqscan, even though there is an index present and it > should be much more efficient to use it. > I tried to synthetically reproduce it, but it won't make the same choice > when i do. > I can reproduce it with a simplified set of the data itself though.

Re: [PERFORM] Effect of the WindowAgg on the Nested Loop

2013-05-15 Thread Victor Yegorov
2013/5/15 Robert Haas > > Original query looks like this ( http://explain.depesz.com/s/pzv ): > > > > After a while I added row_number() to the inner part ( > > http://explain.depesz.com/s/hfs ): > > > > It was really surprising to see a "side" effect of 8x performance boost. > > The only differe

Re: [PERFORM] Large Table - Slow Window Functions (Better Approach?)

2013-03-12 Thread Victor Yegorov
2013/3/11 Jeff Adams - NOAA Affiliate > Greetings, > > > > I have a large table (~90 million rows) containing vessel positions. > > > ... > > > Could you kindly provide a script to create the table and populate it with several sample rows, please? Also, provide the desired output for the sample

Re: [PERFORM] Schema obfuscator for performance question

2013-03-04 Thread Victor Yegorov
2013/3/4 Joseph Pravato > We are having a performance issue with our views in PostgreSQL and based > on the requirements for assistance you recommend providing the full table > and index schema besides additional information from this site. > https://wiki.postgresql.org/wiki/Slow_Query_Questions