Netezza and updates. Good or bad ?

Netezza does not perform updates, but rather does deletes and inserts. Is this a bad thing ?

Simply put, it is not bad. Netezza does mark the record being updated as logically deleted, but does not delete it. This ensures that the database system adheres to the ACID requirements of the SQL standards.

All databases are required to retain a before and after image of a record, oracle copies the before image into the undo tablespace before updating the data for the record. This image will be available for any flashback queries, rollback and queries starting after the update has committed. Netezza marks the record as deleted and appends the new row to the end of the existing data. This data will therefore be retained until it is no longer required.

To this end you require to groom the table, removing the deleted data from the table. This does not lock the table or have any other effect on the database other than running another session. You will be unable to remove the deleted rows from the table until that row has been backed up, so without backups running you will require to force the groom command to remove deleted data from the tables.

There are times when oracle will perform the same functionality, if the row is chained (split between blocks) or migrated (moved to a block with enough space available), which effectively is the same operation. This results in a pointer being left at the original row, pointing to the new row, and a double read for the row.

The GROOM operation, if the table has an organize on clause, will sort the data and give better zonemaps. Compare that to fixing a table with chained and migrated rows in Oracle.

Leave a Reply