|Subject||Re: [firebird-support] Re: Problem in Bulk Insertion in Firebird - Please Help|
Manish Lal Joshi wrote:
> Dear Svein Erling Tysvaer,For the use of external tables look here:
> Okai i searched for a while and found out that prepared statements and
> also bulkwise transaction committing can reduce this time taken.
> And i implemented it too.
> Guess what,the performance increased.
> Previously 1 mins 21 secs was required for a particular task.
> But now it only requires 16 secs.
> No as you have suggested for using EXTERNAL TABLES.
> I was exploring that too but i got stuck.
> For test i did it like this:
> in C#
> TextWriter twriter = new StreamWriter(@"c:\EXTERNALTABLES\ext1");
> for (int i = 0; i < 10; i++)
> After that i tried to assign this ext1 file as EXTERNAL TABLE like this
> command.CommandText = @"CREATE TABLE TEMP1 EXTERNAL FILE
> 'c:\EXTERNALTABLES\ext1'(ID INTEGER);";
> It exexuted well but
> when i tried to query table TEMP1 then i returned result but
> not as expected.
> It gave me garbage result
> I did it like this:
> command.CommandText = @"SELECT ID FROM TEMP1";
> FbDataReader reader= command.ExecuteReader();
> while (reader.Read())
> int iii=reader.GetInt32(0);
> The outputs were:
> I think i am missing something..
> Like the structure of file that i have to define.. but how..?
> Please help me if you know..?
> I want to compare all the results and then implement the method..