Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The implication is that the PL/SQL job was operating rowwise.

Batch processing, backed by set theory in this case, is far more efficient than rowwise operations because of the potential for greater parallelism (SIMD) and fewer cache misses.

E.g., if inserting into a table with a foreign key pointing to the user table, batch processing means you can load the user id index once, and validate referential integrity in one fell swoop. If you do that same operation rowwise, the user id index is liable to get discarded and pulled from disk multiple times, depending on how busy the DB is.



Also, each insert will have to acquire locks, verify referential integrity, and write to any indexes individually. This is time consuming.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: