Re: [PERFORM] Performance degradation of inserts when database size grows

2011-05-24 Thread Santhakumaran
Tomas Vondra wrote: >Dne 24.5.2011 07:24, Terry Schmitt napsal(a): >> As near as I can tell from your test configuration description, you have >> JMeter --> J2EE --> Postgres. >> Have you ruled out the J2EE server as the problem? This problem may not >> be the database. >> I would take a look a

Re: [PERFORM] Hash Anti Join performance degradation

2011-05-24 Thread Craig Ringer
On 24/05/11 22:34, panam wrote: >> The usual cause is that the statistics for estimated row counts cross a >> threshold that makes the query planner think that a different kind of >> plan will be faster. > > Hm, as far as i understand the plans, they are equivalent, aren't they? Yes, they are,

Re: FW: [PERFORM] KVP table vs. hstore - hstore performance (Was: Postgres NoSQL emulation)

2011-05-24 Thread Stefan Keller
Salut Pierre You wrote > Try to create a btree index on "(bench_hstore->bench_id) WHERE > (bench_hstore->bench_id) IS NOT NULL". What do you mean exactly? => CREATE INDEX myhstore_kps_gin_idx ON myhstore USING gin(kvps) WHERE ??? IS NOT NULL; My table's def is: > CREATE TABLE myhstore ( id bigi

Re: [PERFORM] Performance degradation of inserts when database size grows

2011-05-24 Thread Greg Smith
On 05/17/2011 08:45 AM, Andrey Vorobiev wrote: 1. How does database size affect insert performance? As indexes grow, it becomes slower to insert into them. It has to navigate all of the indexes on the table to figure out where to add the new row into there, and that navigation time goes up w

Re: [PERFORM] Hash Anti Join performance degradation

2011-05-24 Thread Tom Lane
panam writes: > In my DB, there is a large table containing messages and one that contains > message boxes. > Messages are assigned to boxes via a child parent link m->b. > In order to obtain the last message for a specific box, I use the following > SQL: > SELECT m1.id FROM message m1 LEFT JOIN

Re: [PERFORM] Performance degradation of inserts when database size grows

2011-05-24 Thread Tomas Vondra
Dne 24.5.2011 07:24, Terry Schmitt napsal(a): > As near as I can tell from your test configuration description, you have > JMeter --> J2EE --> Postgres. > Have you ruled out the J2EE server as the problem? This problem may not > be the database. > I would take a look at your app server's health and

Re: [PERFORM] [PERFORMANCE] expanding to SAN: which portion best to move

2011-05-24 Thread Greg Smith
On 05/17/2011 05:47 AM, Craig Ringer wrote: This makes me wonder if Pg attempts to pre-fetch blocks of interest for areas where I/O needs can be known in advance, while there's still other works or other I/O to do. For example, pre-fetching for the next iteration of a nested loop while still ex

Re: [PERFORM] Hash Anti Join performance degradation

2011-05-24 Thread panam
Hi Craig and Cédric, Thanks for the very informative introduction to the netiquette here and thanks for sharing your time. I wasn't aware of http://explain.depesz.com/, very useful. So, here are the query plans: http://explain.depesz.com/s/6AU (1st from previous post, good) http://explain.depesz.c

Re: [PERFORM] Hash Anti Join performance degradation

2011-05-24 Thread Cédric Villemain
2011/5/24 panam : > Hi, > > In my DB, there is a large table containing messages and one that contains > message boxes. > Messages are assigned to boxes via a child parent link m->b. > In order to obtain the last message for a specific box, I use the following > SQL: > > SELECT m1.id FROM message m

Re: [PERFORM] reducing random_page_cost from 4 to 2 to force index scan

2011-05-24 Thread Vitalii Tymchyshyn
Hello. As of me, all this "hot" thing really looks like uncertain and dynamic enough. Two things that I could directly use right now (and they are needed in pair) are: 1)Per-table/index/database bufferpools (split shared buffer into parts, allow to specify which index/table/database goes where