fasterthanlime / cs322

CS-323 project
2 stars 1 forks source link

Loading the CSV using sqlldr #15

Closed greut closed 12 years ago

greut commented 12 years ago

It's ready to be tested!

$ rake import:all

And no worries about the schema, all includes schema which applies the three sql files drop.sql, schema.sql and data.sql, so no worries about it. If it blows up in between a migrate some tables may remain which will cause an error the next run, delete them manually, i.e.:

echo "drop table temp_drafts;" | sqlplus …

The schema changed too, please review that as well.

greut commented 12 years ago

It does more and it's super fast:

now:
 real    1m27.305s
 user    0m7.248s
 sys     0m0.896s

before:
 real    62m32.486s
 user    12m53.384s
 sys     0m34.218s
nddrylliog commented 12 years ago

Well, this looks splendid! Just tested it and import is really really fast.

(Also, I know this has been said before but Oracle sucks balllzzz to configure. Updating to Ubuntu 12.04 broke it, had to purge the package and reinstall it and re-add userss and re-grant them the rights. But hey, if I ever need to apply to a job at an old dinosaur company I'll be able to list Oracle SQL survival as a skill!)

Also, see my commits, I think it's better that way. I'll get cracking on a few requests now, hopefully. By the way, friday afternoon is a no-go, I've got an important meeting. Sorry! Guess we'll have to do work remotely :x

greut commented 12 years ago

Sweet, Oracle XE isn't packaged correctly and does many many strange stuff. I'm glad to know you managed to work around this. Remotely it'll be. @sebasti4n waddaya think?