Re: dbexport and different rows number
Posted in 2006
Topics: Stored Procedures & SPL, Migration, Import/Export & Data Conversion, Internationalization & Character Sets
I have seen this as well, in my case the difference between the number of
rows in the .sql file and a wc -l on the .unl file was due to some rows
being split over two (or more) lines. Maybe you also have carriage
return/newline characters is your data
Regards
Colin
There are 10 types of people in the world, those that understand binary and
those that don't
>From: "Brian Grellinger" <Brian.Grellinger@dhiac.com>
>To: <informix-list@iiug.org>, <piotr_h@tlen.pl>
>Subject: Re: dbexport and different rows number
>Date: Fri, 30 Jun 2006 10:04:05 -0400
>
>You didn't post your version but I've seen this on older versions,
>especially on SE.
>Make sure you 'update statistics' before the dbexport, that usually
>helps.
>
>
>Brian Grellinger
>I.S. Manager
>Doosan Infracore America Corp
>Information Systems
>
> >>> "ph" <piotr_h@tlen.pl> 06/30/06 06:08AM >>>
>Hi, I exported informix database using dbexport buildin tool.
>I have many tables and in same cases there are difference between row
>number reported in sql exported file and real number of rows in unl
>file:
>
>eg.
>
>{ TABLE test row size = 8 number of columns = 2 index size = 24 }
>{ unload file name = test101.unl number of rows = 91425 }
>
>but real number of rows is 91320
>While is this?
>
>ph
>
>_______________________________________________
>Informix-list mailing list
>Informix-list@iiug.org
>http://www.iiug.org/mailman/listinfo/informix-list
>
>
>_______________________________________________
>Informix-list mailing list
>Informix-list@iiug.org
>http://www.iiug.org/mailman/listinfo/informix-list
_________________________________________________________________
Windows Live' Messenger has arrived. Click here to download it for free!
http://imagine-msn.com/messenger/launch80/?locale=en-gb
Undoing some top posting:
>> "ph" <piotr_h@tlen.pl> wrote:
>>> Hi, I exported informix database using dbexport buildin tool.
>>> I have many tables and in same cases there are difference between row
>>> number reported in sql exported file and real number of rows in unl
>>> file:
>>>
>>> eg.
>>>
>>> { TABLE test row size = 8 number of columns = 2 index size = 24 }
>>> { unload file name = test101.unl number of rows = 91425 }
>>>
>>> but real number of rows is 91320
>>> While is this?
> Brian Grellinger wrote:
>> You didn't post your version but I've seen this on older versions,
>> especially on SE.
>> Make sure you 'update statistics' before the dbexport, that usually
>> helps.
Colin Dawson wrote:
> I have seen this as well, in my case the difference between the number
> of rows in the .sql file and a wc -l on the .unl file was due to some
> rows being split over two (or more) lines. Maybe you also have
> carriage return/newline characters is your data
If the actual number of lines counted was larger than the number
reported by DB-Export, you'd have a valid case. When the number of
lines counted is smaller than the number reported by DB-Export, that
isn't the reason. It is really quite hard to count the rows accurately
if the data contains embedded newlines.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
Jonathan Leffler wrote:
> Undoing some top posting:
>
>>> "ph" <piotr_h@tlen.pl> wrote:
>>>> Hi, I exported informix database using dbexport buildin tool.
>>>> I have many tables and in same cases there are difference between row
>>>> number reported in sql exported file and real number of rows in unl
>>>> file:
>>>>
>>>> eg.
>>>>
>>>> { TABLE test row size = 8 number of columns = 2 index size = 24 }
>>>> { unload file name = test101.unl number of rows = 91425 }
>>>>
>>>> but real number of rows is 91320
>>>> While is this?
>
>> Brian Grellinger wrote:
>>> You didn't post your version but I've seen this on older versions,
>>> especially on SE.
>>> Make sure you 'update statistics' before the dbexport, that usually
>>> helps.
>
> Colin Dawson wrote:
> > I have seen this as well, in my case the difference between the number
> > of rows in the .sql file and a wc -l on the .unl file was due to some
> > rows being split over two (or more) lines. Maybe you also have
> > carriage return/newline characters is your data
>
> If the actual number of lines counted was larger than the number
> reported by DB-Export, you'd have a valid case. When the number of
> lines counted is smaller than the number reported by DB-Export, that
> isn't the reason. It is really quite hard to count the rows accurately
> if the data contains embedded newlines.
Can't you just count the number of lines that end with a '|' ?
grep -c \\|$ foo.unl