Re: [PERFORM] Pg makes nonoptimal choice between two multicolumn indexes with the same columns but in different order.

2013-12-28 Thread Michael Kolomeitsev
2013/12/29 Tom Lane > I think that's just chance, because AFAICS the cost estimates are exactly > the same for both indexes, once you've done the vacuum to make all the > heap pages all-visible. What's more, I'm not sure that that's wrong, > because according to EXPLAIN (ANALYZE, BUFFERS) the ex

Re: [PERFORM] Pg makes nonoptimal choice between two multicolumn indexes with the same columns but in different order.

2013-12-28 Thread Tom Lane
Kevin Grittner writes: > Michael Kolomeitsev wrote: >> it is clear for me why t1_b_a_idx is better. The question is: Is >> postgresql able to see that? > For a number of reasons I never consider a bulk load complete until > I run VACUUM FREEZE ANALYZE on the table(s) involved.  When I try > your

Re: [PERFORM] Pg makes nonoptimal choice between two multicolumn indexes with the same columns but in different order.

2013-12-28 Thread Gavin Flower
On 29/12/13 10:03, Kevin Grittner wrote: Michael Kolomeitsev wrote: it is clear for me why t1_b_a_idx is better. The question is: Is postgresql able to see that? For a number of reasons I never consider a bulk load complete until I run VACUUM FREEZE ANALYZE on the table(s) involved. When I t

Re: [PERFORM] Pg makes nonoptimal choice between two multicolumn indexes with the same columns but in different order.

2013-12-28 Thread Kevin Grittner
Michael Kolomeitsev wrote: > it is clear for me why t1_b_a_idx is better. The question is: Is > postgresql able to see that? For a number of reasons I never consider a bulk load complete until I run VACUUM FREEZE ANALYZE on the table(s) involved.  When I try your test case without that, I get th

Re: [PERFORM] Are there some additional postgres tuning to improve performance in multi tenant system

2013-12-28 Thread Andrew Dunstan
On 12/28/2013 08:46 AM, ankush upadhyay wrote: On Sat, Dec 28, 2013 at 6:50 PM, Andrew Dunstan > wrote: On 12/28/2013 12:19 AM, ankush upadhyay wrote: Hello All, I am using multi tenant system and doing performance testing of multi tena

Re: [PERFORM] Are there some additional postgres tuning to improve performance in multi tenant system

2013-12-28 Thread ankush upadhyay
On Sat, Dec 28, 2013 at 6:50 PM, Andrew Dunstan wrote: > > On 12/28/2013 12:19 AM, ankush upadhyay wrote: > >> Hello All, >> >> I am using multi tenant system and doing performance testing of multi >> tenant application. In case of single tenant it is working fine but once I >> enable tenants, th

Re: [PERFORM] Are there some additional postgres tuning to improve performance in multi tenant system

2013-12-28 Thread Andrew Dunstan
On 12/28/2013 12:19 AM, ankush upadhyay wrote: Hello All, I am using multi tenant system and doing performance testing of multi tenant application. In case of single tenant it is working fine but once I enable tenants, then some time database servers not responding. Any clue? I usuall

Re: [PERFORM] Are there some additional postgres tuning to improve performance in multi tenant system

2013-12-28 Thread ankush upadhyay
I am using multiple databases in my app for multi tenacy environment. In my app user login with tenant id and connect to respective database. The scenario is when 5 users connect to 5 databases and perform some activity in that case site performance going down and some time database server become

Re: [PERFORM] Are there some additional postgres tuning to improve performance in multi tenant system

2013-12-28 Thread Mark Kirkwood
On 28/12/13 18:19, ankush upadhyay wrote: Hello All, I am using multi tenant system and doing performance testing of multi tenant application. In case of single tenant it is working fine but once I enable tenants, then some time database servers not responding. Any clue? It is a bit tricky to