Subject | Re: Absolute Mystery |
---|---|
Author | Adam |
Post date | 2005-02-15T22:53:14Z |
Hi Edwin,
The only gotcha I can think of at the moment, is maybe one (or many)
of the transactions is still uncommitted, or your transaction you are
running select count(*) from was started before all of the insert
transactions were committed.
Other possibilities:
What happens when this code raises an exception (duplicate key
violation or similar)? Does your application raise this, or does the
script stop on these errors?
INSERT INTO DROP_FILE(FIELD_1,FIELD_2,FIELD_3)
VALUES(:PASSED_VALUE_A,:PASSED_VALUE_B,:PASSED_VALUE_C);
How have you calculated the original script query count? Are you
possibly including blank lines in this count?
Is it possible for the input to have too many characters to fit into
the input parameter of the stored procedure?
Perhaps you could try and locate the last record you attempted to
insert from each script, and see whether there is any script that did
not totally complete? When it is inserting hundreds of records per
second, you have to be watching closely to see a problem.
Adam
--- In firebird-support@yahoogroups.com, "Edwin A. Epstein, III"
<eepstein@c...> wrote:
The only gotcha I can think of at the moment, is maybe one (or many)
of the transactions is still uncommitted, or your transaction you are
running select count(*) from was started before all of the insert
transactions were committed.
Other possibilities:
What happens when this code raises an exception (duplicate key
violation or similar)? Does your application raise this, or does the
script stop on these errors?
INSERT INTO DROP_FILE(FIELD_1,FIELD_2,FIELD_3)
VALUES(:PASSED_VALUE_A,:PASSED_VALUE_B,:PASSED_VALUE_C);
How have you calculated the original script query count? Are you
possibly including blank lines in this count?
Is it possible for the input to have too many characters to fit into
the input parameter of the stored procedure?
Perhaps you could try and locate the last record you attempted to
insert from each script, and see whether there is any script that did
not totally complete? When it is inserting hundreds of records per
second, you have to be watching closely to see a problem.
Adam
--- In firebird-support@yahoogroups.com, "Edwin A. Epstein, III"
<eepstein@c...> wrote:
> Well I am stumped on this one.from a
>
> I had 4.2 million lines of a stored procedure that was to be run
> script. I broke it up into several different batches, so it wasnot all
> going to be in one transaction.otherwise, creates
>
> An example of a line:
>
> EXECUTE PROCEDURE PROC_A('12341234','AB','DJSDADKJJJSJJ');
>
> PROC_A does some lookups and inserts, etc. It also has:
>
> WHEN ANY DO
> BEGIN
> INSERT INTO DROP_FILE(FIELD_1,FIELD_2,FIELD_3)
> VALUES(:PASSED_VALUE_A,:PASSED_VALUE_B,:PASSED_VALUE_C);
> END
>
> So any exception that the procedure throws, deliberate or
> a drop record in the DROP_FILE table.be in
>
> After completing all the batches, all of the results are going to
> either TABLE_A or DROP_FILE. So a count(*) on both tables addedtogether
> should equal 4.2 million records.has the
>
> It adds up 450K short. Hmmmmmm
>
> Okay. I checked 20 random lines from each script file. Every file
> majority of the lines processed. I assume this since the databeing passed
> into the procedure is unique and I can find a record in eitherTABLE_A or
> DROP_FILE.The whole
>
> Why are some of the lines not being processed in the script file?
> script file is inside one transaction. So if the whole thingrolled back I
> would see one script file missing completely. Where are the missing
> records?
>
> Has anybody had anything like this happen to them?