Greeting Tony,

"Tony Ho" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi guys
> I was wondering if you could help me.
>
> I am currently designing Perl DBI code to extract data from tables from
> Sybase Database under UNIX.
> There are a dozen of tables I need to extract information from.
> The biggest tables are ACCOUNTS and SUBSCRIBERS.
> ACCOUNT has 10 million rows and SUBSCRIBERS has 20 million rows.
> SUBSCRIBERS is related to the ACCOUNTS table as every account has
> subscribers.
>
> At the end of the extraction process, I need to end up with 1 or 2 flat
> files that shows rows of SUBSCRIBER data and rows of ACCOUNT data
associated
> to those subscribers.

Oooohhhh, flat files....

>
> Which is the better option in terms of performance and reliability:
>
> Access the sybase tables with SELECT+JOIN sql statements, order and write
> the results to the overall flat file file immediately ?


This really a DBA question and not a perl.

>
> OR
>
> BCP out the results into multiple files and manipulate/rearrange/order
them
> into a single file under Unix.

BCP is fast and quick but will generate more data than it looks like you
will use.  If you are planning to join multiple tables leverage the power of
the dataserver. Combine the data you need in the dataserver via a join or
joining on multiple temp tables. Don't extract all your data to flat files
just to combine them, your asking for more work than necessary. When you
generate your results print it to a file.

What are you planning to do with the flat file?

>
> I would be most grateful if you could help me out.
> Cheers
> T
>
>
>

Gyro



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

Reply via email to