Re: Postgres insert performance and storage requirement compared to Oracle

Поиск
Список
Период
Сортировка
От Divakar Singh
Тема Re: Postgres insert performance and storage requirement compared to Oracle
Дата
Msg-id 25247.43880.qm@web65408.mail.ac4.yahoo.com
обсуждение исходный текст
Ответ на Re: Postgres insert performance and storage requirement compared to Oracle  (David Wilson <david.t.wilson@gmail.com>)
Список pgsql-performance




    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.
 




В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Regression: 8.3 2 seconds -> 8.4 100+ seconds
Следующее
От: Francisco Reyes
Дата:
Сообщение: Re: Regression: 8.3 2 seconds -> 8.4 100+ seconds