in reply to MySQL Table Creation using DBI

As for your question about number of tries. It's hard to say for sure as i dont know what kind of data you get when there are multiple tries, but i would reccommend using an array of hashrefs instead of searching for "try_".$x."_foo"

here is part of such a astructure(assumimg that some info will be the same for all tries)

$VAR435 = 273118; $VAR436 = { jobtype => 'immediate', try => 1, group => '', subtype => 1, filelistcount => 1, status => '0', tries=> [ { server => 'netbackup2', ended => '1031010812', statuscount => 12, stunit => 'netbackup2_stu' }, { server => 'netbackup3', ended => '1031010813', statuscount => 13, stunit => 'netbackup3_stu' } ] }
In this case you'd be able to loop through the hashes in @{$data{273118}{tries}} to make your tables. In many cases a good place to start optimizing and simplifying is in the code that generates your datastructure.