One thing for you to try is adjusting the autocommit behavior. I found a link for you...
. Read through this to figure out the Sybase method and lingo. Basically the DB does a lot of bookeeping to preserve integrity when modifying the DB. If you turn this off, performance will jump by a considerable factor at the cost of not being to recover if there is a crash while this huge script is running. In lots of scenarios that "risk" is just fine and you can just start completely over. This is something that I would do when say doing the initial creation of a million line table in MySQL (takes about 40 seconds this way and I don't care I have to delete the whole table and start completely over). Your mileage will vary.