> Hi

Howdy!

> 
> I have 10 files, each file has 3000 lines. I have two options 
> but I need to 
> know which option is better in disk space and in cpu (the 
> fastest one when I 
> need th edata):
> 
> 1. Keep the 10 files in one Zip, and When its time to use 
> them, unzip them, 
> and start parsing and processing each one.
> 
> 2. Save each file in row of a table of my Database (using 
> MySql, so I need to 
> use DBI), and when Its time to use it, connect to the 
> database, and retrieve 
> row by row.

# 2 would seem to me to be a zillion times better. For instance if you want everythign 
just do:

SELECT ... FROM table

Done

But with # 1

Unzip files
Open files
Read files
Do somthign with each line
Close files

Now what if you want to grab specific data, say all of them with foo as the bar?

SELECT ... FROM table WHERE foo='bar'

Done

But with number one:

Unzip files
Open files
Read files
Look at eahc line 
Decide what to do witht the liine
Do that with the line
Close files

Flat files are ok for tiny tiny databases but for 30000 records mysql will be tons 
easier to develop, easier to manage, and easier to use, faster (by a lot) etcc...

HTH

DMuey

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to