Subject | Re: At my wits end |
---|---|
Author | bjonessb |
Post date | 2004-03-13T04:04:57Z |
I'll throw in my two cents worth. One of the applications I write
involves daily imports. I use IBpump by Clever Components. I use
the DLL and compile it into my application. I don't know by, but
IBpump is much faster than any other tools I've tried. I get about
1200 inserts per second, and I'm inserting about 40 fields, and
about 800 bytes per record. This is over a 100MB connection.
I have played with another solution that is even faster, but have
not implemented it yet. Are you able to create store procedures on
your server? If so, you could insert the entire file into a blob
field in a "staging" table on the server. This is not much slower
than just copying a file from a client computer to the server. It
would probably take a few seconds in your case. Then you could
write a stored procedure to parse this blob field, and insert the
records into the destination table(s). In my test, I net about 5000
inserts per second, but the stored procedure has gotten a little
complicated.
Bill
--- In firebird-support@yahoogroups.com, "Epstein, Ed"
<eepstein@c...> wrote:
involves daily imports. I use IBpump by Clever Components. I use
the DLL and compile it into my application. I don't know by, but
IBpump is much faster than any other tools I've tried. I get about
1200 inserts per second, and I'm inserting about 40 fields, and
about 800 bytes per record. This is over a 100MB connection.
I have played with another solution that is even faster, but have
not implemented it yet. Are you able to create store procedures on
your server? If so, you could insert the entire file into a blob
field in a "staging" table on the server. This is not much slower
than just copying a file from a client computer to the server. It
would probably take a few seconds in your case. Then you could
write a stored procedure to parse this blob field, and insert the
records into the destination table(s). In my test, I net about 5000
inserts per second, but the stored procedure has gotten a little
complicated.
Bill
--- In firebird-support@yahoogroups.com, "Epstein, Ed"
<eepstein@c...> wrote:
> First of all I would like to apologize for any improper posting.The
> production server here at my company is IB V7.0.0.1. All mypersonal
> projects started out as IB V6, but since its not under constantdevelopment,
> firebird 1.5. I did not mean to upset anybody.should
>
> As for my use of tps, I meant transactions per second. I guess I
> really be saying Inserts per second. I personally have triedcommits from
> around 10-10000. The C++ test code was committing every 1000records.
>correctly the
> The test code was an c++ external app. However, if it worked
> coders would of changed it into a component I could use inside ofVB6
> therefore not making it an external application anymore. Thecomponent
> would of only needed to support multiple SQL statements at a timeand return
> SQL error codes if any.resides
>
> An external table cannot be done. This is since the server itself
> on a dedicated server within the network. The ability to have thefrontend
> create an external file and transfer it to a place accessible bythe server
> does not exist. The program must be able to work from outside theitself might
> corporation as well. Also, I have been told that the server
> change platforms from Win2k to Linux. So creating a client/serverprogram
> to transfer the external table is also not a viable idea.Basically, the
> only way to get data to the server is through a connection to theserver
> only.processed.
>
> As for data itself...
>
> Almost every day of the week files will be coming in that need to
> They are all CSV formatted. They can contain anywhere from 100-1000000
> records. I would have to say that about 750,000 records per weekis the
> average. The size of each record is averaged about 200 bytes (seethe end
> of the post). It is being moved into a single table with 2 or 3indexes on
> it. ( All of the tests being performed were with 10 varchar(30)fields with
> no indexes, triggers, generators, or constraints)into the
>
> I completely understand that ADO and ODBC (and OLE) do not fall
> "lean" layer category. I did not mean to tar firebird withinterbase 7's
> brush either. I know that the performance lies in my setupsomewhere and is
> not an inherent factor of either interbase or firebird.imported into
>
> Finally, the reason that the files cannot be scheduled to be
> the database using other means is time. The results of each ofthese files
> must be ready within the same day, if not hours. Waiting 24-48hours for the
> data to be imported is not acceptable in this case. The frontendmust be
> able to accomplish this on its own. Its a specific requirement.appreciate all of
>
>
> I don't mean to be difficult to get information out :) I
> your help. Thanks.varchar
>
>
> There are 14 varchar fields. Allowing for the 2 byte overhead the
> data can range from 44 bytes to 250 bytes. The other fields are30 bytes
> altogether. So each record ranges from 77 bytes to 280 bytesCHARACTER SET
>
>
> CREATE TABLE PULLMASTER
> (
> HEXID VARCHAR( 6)
> ASCII NOT NULL COLLATE ASCII,NULL,
> PHONE DOUBLE PRECISION NOT
> FIRSTNAME VARCHAR( 30)CHARACTER SET
> ASCII NOT NULL COLLATE ASCII,CHARACTER SET
> MI VARCHAR( 1)
> ASCII COLLATE ASCII,CHARACTER SET
> LASTNAME VARCHAR( 30)
> ASCII NOT NULL COLLATE ASCII,CHARACTER SET
> ADDRESS VARCHAR( 50)
> ASCII NOT NULL COLLATE ASCII,CHARACTER SET
> CITY VARCHAR( 30)
> ASCII NOT NULL COLLATE ASCII,CHARACTER SET
> ST VARCHAR( 2)
> ASCII NOT NULL COLLATE ASCII,NULL,
> ZIP VARCHAR( 5) NOT
> ZIP4 VARCHAR( 4),CHARACTER SET
> SAL VARCHAR( 5)
> ASCII COLLATE ASCII,CHARACTER SET
> CUID VARCHAR( 25)
> ASCII COLLATE ASCII,DEFAULT
> CDATE TIMESTAMP
> CURRENT_TIMESTAMP,CHARACTER SET
> DISPO SMALLINT,
> STATUS SMALLINT,
> TIMEZONE SMALLINT,
> FIRSTNAME2 VARCHAR( 30)
> NONE COLLATE NONE,CHARACTER SET
> MIDDLENAME2 VARCHAR( 1)
> NONE COLLATE NONE,CHARACTER SET
> LASTNAME2 VARCHAR( 30)
> NONE COLLATE NONE,may be
> BID INTEGER,
> SID INTEGER,
>
> );
>
>
>
>
> Edwin Epstein
> > Continuity Partners Inc.
> > 2753 S. Highland Dr.
> > Suite 1010
> > Las Vegas, Nevada 89109
> > (702) 851-7850 Ext. 247
> > eepstein@c...
> >
> CONFIDENTIALITY NOTICE: The information contained in this message
> privileged and confidential and protected from disclosure.employee
> If the reader of this message is not the intended recipient, or an
> or agent responsible for delivering this messagedissemination,
> to the intended recipient, you are hereby notified that any
> distribution or copying of this communication iserror,
> strictly prohibited. If you have received this communication in
> please notify us immediately by replying to the message andwith working
> deleting it from your computer.
>
>
>
>
> -----Original Message-----
> From: Helen Borrie [mailto:helebor@t...]
> Sent: Friday, March 12, 2004 2:23 PM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] RE: At my wits end
>
>
> At 01:02 PM 12/03/2004 -0800, you wrote:
> >I have been coding with VB6 and naturally have had many issues
> >with Interbase/Firebird etc. After much testing I decided to usemove
> >SIBProvider. Its very adequate for my needs. However, I need to
> >500K-1M records at a time into the database and that has provenan near
> >insurmountable challenge ( I only say near since I still have alittle bit
> >of hope). After coming to the obvious conclusion that the ADOand OLEDB
> >layers are slowing the transactions down, the obvious answer wasto bypass
> >them entirely. Only 3 solutions presented themselves (largely inpart to
> >this forum):import
> >
> >1) Use the API directly - Don't have the skill
> >2) Use an external program written to use the API - SQL scripts,
> >engines like FBExport, etc. I really needed a way to do itinternally and
> >they did not even reach an accetable speed.come up
> >3) Use external tables. This does not work since I would have to
> >with a method of delivering them to the server. This has provedto be
> quitewritten to
> >impossible due to circumstances that I cannot control.
> >
> >I took the advice of this forum and paid to have a component
> >execute the SQL statements for me and use only the API to dothis. No ADO
> >layers, etc. Just pure looped API statements.testing
> >
> >This does EVEN worse than ADO and OLEDB. I received multiple
> >programs from potential coders and none of them could even break100 tps,
> >let alone the 1500 tps i need.transaction?
>
> Questions
>
> tps = what? Are you trying to do this one transaction per record?
> If not (and hope not) how many records are being committed per
>imports? (It
> What kind of source input data is it? Record size?
>
> Are you importing into one table or several?
>
> Are the destination tables indexed?
>
> What's the reason you can't use an external tool for these
> seems the obvious thing if your only options are ADO or ODBC).It's
> impossible to tell what you're getting for your dollar from theAPI coders
> but won't a custom C application be "external" as well? Wouldn'tyour
> dollar be better spent on an existing tool, or on coding anapplication to
> convert the data into a format suitable for an external table?database
>
>
> >So I am at my wits end here. Its got to be the server.
>
> >Interbase V7.0.0.1
> >
> >No other services running on the server. Purely dedicated to the
>7.1.2,
> Have you considered applying the patches to IB 7? It's now at
> having been through a major 7.1 "upgrade" and received twosubsequent bug
> patches.it's
>
> It don't "got to be the server", although without the bugfixes
> probably playing its part. For this volume of import you'd betterhave the
> leanest possible connectivity layer. ODBC and ADO providers don'tfall
> into the "lean" category.to their
>
> >So I just really
> >need to know if anybody out there is getting more than 1500 tps
> >Interbase/Firebird server and what their setup is. I loveInterbase to
> >death, really I do. I cannot even change it if I wanted to.to an
>
> Have you tried (as a test) using Firebird 1.5 to import the data
> independent database and then pumping it? Don't automatically tarFirebird
> with InterBase 7's brush...
>
> /heLen
>
>
>
>
> Yahoo! Groups Links