pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Divakar Singh <dpsmails@yahoo.com>
To: David Wilson <david.t.wilson@gmail.com>
Cc: Steve Singer <ssinger@ca.afilias.info>
Cc: jd@commandprompt.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres insert performance and storage requirement compared to Oracle
Date: Wed, 27 Oct 2010 09:12:24 -0700 (PDT)
Message-ID: <25247.43880.qm@web65408.mail.ac4.yahoo.com> (raw)
In-Reply-To: <AANLkTinUWnfp8v0s2dugH=M1fwDBkUExiSsJj81Yst_s@mail.gmail.com>
References: <132275.30531.qm@web65411.mail.ac4.yahoo.com>
	<AANLkTinUWnfp8v0s2dugH=M1fwDBkUExiSsJj81Yst_s@mail.gmail.com>








>    for (;  i<howmany;i++ )
>    {
>
>    sprintf (query, "INSERT INTO aaaa(a, b, c, d, e, f, g, h, j, k, l, m, n, p) 
>VALUES (67, 'ABRAKADABRA', 'ABRAKADABRA', 'ABRAKADABRA', '1-Dec-2010', 
>'ABRAKADABRA', 'ABRAKADABRA',  'ABRAKADABRA', '1-Dec-2010', 99999, 99999, %d, 
>9999, 
>'ABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRAABRAKADABRA')",
> i);
>
>    res = PQexec(conn, query);
>
>      if (PQresultStatus(res) != PGRES_COMMAND_OK)
>        {
>          cout<<"error at iteration "<<i<<":"<<PQresultErrorMessage(res)<<endl;
>                  PQclear(res);
>          break;
>         }
>        //PQclear(res);
>
>
>    }
>

>Why is that PQclear(res) commented out? You're leaking result status for every 
>insert.


I did that purposely to see if cleanup part is contributing to  any performance 
loss.
Right now in my test, memory leak is not a concern for me but performance is. 
Though I understand that memory leak can also result in performance loss  if 
leak is too much.
However, in this case, commenting or uncommenting this statement did not  cause 
any change in performance.


      

view thread (53+ messages)  latest in thread

Message-ID: <25247.43880.qm@web65408.mail.ac4.yahoo.com>
Permalink:  ../25247.43880.qm@web65408.mail.ac4.yahoo.com/
Also on:    postgresql.org/message-id/25247.43880.qm@web65408.mail.ac4.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dpsmails@yahoo.com, david.t.wilson@gmail.com, ssinger@ca.afilias.info, jd@commandprompt.com
  Subject: Re: Postgres insert performance and storage requirement compared to Oracle
  In-Reply-To: <25247.43880.qm@web65408.mail.ac4.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox