I've been tasked with migrating XML data from Postgres to Oracle. However, some of our 
XML entities make Oracle choke (don't ask me why, im the postgres guy, and it works in 
_my_ database...). So I'm parsing over the XML data which already lives in postgres. 
Take for example the following code:

while (my $ref = $iterator -> fetchrow_arrayref() ) {
        my ($filename, $contents) = @{ $ref };
        $contents = munge($contents);
        $heap -> {dbiagent} -> push_query(
                query => qq{ update xml_munged set tag1 = ?, tag2 = ? tag3 = ? },
                bindvals => [ @tags ],
        );
}

So here we see stuff that (as far as I can tell from reading the pod) is just sloughed 
off to the agent. I know the update is going to take a while since I'm actually 
passing it 30 columns for its update plus the actual XML, however my select operates 
much faster (my selects on a heavily indexed table work at around 360/s versus 90/s 
for the inserts/updates). In this scenario, I don't really care about a return value, 
I just want to have the database deal with the inserts, and POE make it easy for perl 
to do this. I'm also aware that this will be hard on the machine running Oracle, as 
well as the machine running perl. This doesn't bother me too much, the Oracle server 
is an E3500, and the perl machine is "expendable."

Thanks,
alex

Reply via email to