April 2017
Beginner to intermediate
360 pages
9h 35m
English
There is a performance penalty associated with the batchlog as it is written to two other nodes. If you do not want to incur this penalty, run the batch operation without using the batchlog table using the UNLOGGED keyword. So, to execute the earlier batch statement as an unlogged batch, you would have to execute the following command:
BEGIN UNLOGGED BATCH INSERT INTO "user_status_updates" ("username", "id", "body") VALUES( 'dave', 16e2f240-2afa-11e4-8069-5f98e903bf02, 'dave update 4' ); INSERT INTO "home_status_updates" ( "timeline_username", "status_update_id", "status_update_username", "body") VALUES ( 'alice', 16e2f240-2afa-11e4-8069-5f98e903bf02, 'dave', 'dave update 4' ); APPLY BATCH;
Unlogged batches ...
Read now
Unlock full access