473,657 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fastly Inserting Records

18 New Member
Hello Friends,

In a Table I am inserting more than 50,000 Records one by one. It was taking a lot of time . Is it There any good approach/solution for inserting records more than 50,000 one by one in a fast manner. I have the same Problem in Updating of Records also. Please help me regarding this issue.

I am Using VC++ application As a Front End and libpq 'C' interface as a interface between my application and PostgreSQL Backend Database. when ever there is an error libpq interface is giving that error. But I would like to change the Message/Content That was coming from libpq interface. How Can I chnage the message/Content.

waiting for your valuable reply.

ThanQ
Feb 25 '07 #1
1 2006
michaelb
534 Recognized Expert Contributor
There is a number of factors that can impact performance of your application, and what you posted is not nearly enough to suggest any improvements.

Depending on where you get these data (select from other tables?) you may be able to do something more efficient than individual insert for every record.

You need to make sure that slow performance is not related to scarce system resources (are you getting enough CPU, for example?)

Too many indexes on the table will slow down any DML operations, so make sure you have only what you need.

Also there is a number of configuration settings that can affect performance
(see postgresql.conf and database run-time parameters)

Depending on the platform (Windows, Solaris, etc) and the version of Postgresql there could be more tips on performance.

Last, but not least the schema itself sometimes needs to be optimized for performance.

I don't quite understand the second question; are you talking about error messages you get from PQerrorMessage or PQresultErrorMe ssage?
Feb 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2048
by: Pushpendra Vats | last post by:
Hi , I am trying to insert records into database. I am trying to write the following code. On button1 click event i am inserting five records and after that i am calling the update method of dataadapter to update the records in database. Records are inserting but all the five records have the same value and that too of that last ones.. More over i tried to use the acceptchanges methods for datatable and dataset but of no use
10
12292
by: Roger Withnell | last post by:
I'm using ASP, VBScript and SQL Server. I'm also using UTF-8 character set and so my codepage is 65001 and SQL Server datatype nvarchar. I can insert unicode characters correctly into the database table using INSERT.... (field1) ...VALUES ......... (N'Characters'). How do I do this using Rs.Update viz-a-viz:
1
1992
by: gouse | last post by:
Hi, Friends I have a table with 2 lakh records (one text field, one int4 field, and a Gemetry field). When I was executing the query using Binary cursors, It was taking nearly 35 seconds. I am executing my query as follows BEGIN; DECLARE MyCursor BINARY CURSOR for select Field1,Field2(Geometry Field) from Table; Fetch All into MyCursor; Here I have Just write the loop from 1 to 200000 with out doing any thing like below.
7
6636
by: ebindia0041 | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, Asp.net 1.1 with c# I'm inserting simple records into a table. But one insert command is placing 2 or 3 records into the table. The 'extra' records, have the same data as the previous insert incident, (except for the timestamp). Here is an example. Follow the values of the 'Search String' field:
3
1768
by: veerapureddy | last post by:
Hai everybody, i like to insert some records into database from html form by entering data.my problem is how can i check , whether a record is available in database about a particular employee before inserting. if a employee record is available(for example based on employee num) , then if i try to insert again with that employee id, it should not enter into database(avoid duplicate records with same employee num) can any one...
13
3041
by: imnewtoaccess | last post by:
Hi, I am getting errors while inserting records in one table from another. These are the structures of two tables : file51tm_new RecordType Text
6
11756
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the contents of the form is inserted into the MS Access database. The Customer table in the database already has 30 records (with CustomerIDs 1 - 30) in it (from when the database was first created). The CustomerID field in the database is an...
2
3075
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography section: Discography --------------------- DiscID
5
2163
by: rando1000 | last post by:
Okay, here's my situation. I need to loop through a file, inserting records based on a number field (in order) and if the character in a certain field = "##", I need to insert a blank record. So here's my method. I created two tables with the same structure as the table I'm inserting from. One table, Split_Temp, is the one I'll be inserting to. The other table, Split_Insert, contains the "Blank" record, which actually just has the word...
0
8403
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8316
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5636
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.