List:General Discussion« Previous MessageNext Message »
From:Chris Fossenier Date:February 20 2004 10:53pm
Subject:RE: White Space
View as plain text  
Thanks for the posts folks. Right after I posted I re-wrote my parser to use
~ for commas and ^ for quotes. It seems to be working. I didn't want to say
I was doing that because it seemed kinda "hack" >:).

I'm not in favor of running TRIM() functions due to the overhead with so
many records.

We'll see if this modification works for all 120million. So far it worked
for a 6mill sample.

Thanks.

Chris.

-----Original Message-----
From: Donny Simonton [mailto:donny@stripped] 
Sent: Friday, February 20, 2004 3:04 PM
To: 'Dan Nelson'; 'Chris Fossenier'
Cc: mysql@stripped
Subject: RE: White Space


Chris,
Another option is to use | instead of commas.  Unless you have pipes in your
file.  :)

Donny

> -----Original Message-----
> From: Dan Nelson [mailto:dnelson@stripped]
> Sent: Friday, February 20, 2004 2:55 PM
> To: Chris Fossenier
> Cc: mysql@stripped
> Subject: Re: White Space
>
> In the last episode (Feb 20), Chris Fossenier said:
> > What is the best way to deal with white space in a mysql database?
> >
> > What I'm talking about is trailing spaces in larger fields. We 
> > receive data in fixed width format, so when you import it, you get a 
> > bunch of trailing white spaces that take up space. Multiply these 
> > white spaces by 120million records and it adds up.
>
> If you use VARCHAR fields, mysql will automatically strip trailing 
> whitespace.  If you use CHAR fields, stripping space won't help you 
> since it's a fixed-width field :)
>
> If you need leading and trailing space stripped, you can postprocess 
> the field with the TRIM() function.
>
> --
> 	Dan Nelson
> 	dnelson@stripped
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: 
> http://lists.mysql.com/mysql?unsub=1
>





Thread
White SpaceChris Fossenier20 Feb
  • Re: White SpaceDan Nelson20 Feb
    • RE: White SpaceDonny Simonton20 Feb
    • Re: White SpaceKeith C. Ivey20 Feb
  • Re: White SpaceBrent Baisley20 Feb
RE: White SpaceChris Fossenier20 Feb