Unix Technical Forum

how to speedup huge insert from an ODBC app

This is a discussion on how to speedup huge insert from an ODBC app within the Pgsql Performance forums, part of the PostgreSQL category; --> Hello, PostgreSQL 7.4.8 on Linux here. We have an ODBC application that must store up to 2660850 rows in ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 08:15 AM
Cris Carampa
 
Posts: n/a
Default how to speedup huge insert from an ODBC app

Hello, PostgreSQL 7.4.8 on Linux here.

We have an ODBC application that must store up to 2660850 rows in a table.

With "store" I mean this logic:

if PK exists then
update columns ;
else
insert new row;
end if ;

I think the best way to do that is to try to update first, then check
out how may rows were updated: if this number is 0, then insert new row.

Is this correct?

How can I speedup this task, apart from issuing a BEGIN TRANSACTION at
the beginning and a COMMIT WORK at the end, of course?

Thank you. Kind regards,

--
Cris Carampa (spamto:cris119@operamail.com)

potevo chiedere come si chiama il vostro cane
il mio è un po' di tempo che si chiama Libero


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:31 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com