---
title: "Enable upsert to a database"
canonical: "https://docs.perspectium.com/space/helium/2113683/Enable%20upsert%20to%20a%20database"
format: markdown
---
For  .bulk  messages, the  DataSync Agent  will query for a record to see if it exists and if so,  update  that record.  Otherwise if the record doesn't exist, an  insert  will occur. However for databases that support it, the Agent can perform an  upsert  action where updating or inserting is done in one action to help improve performance on large tables that have hundreds of millions or billions of records. To enable this, you will need to use the  < enable_upsert />  directive. Enabling upsert is only available for  SAP Hana . Prerequisites  First, you will need to set up one of the Perspectium  DataSync Agents  that supports  upsert.   You should also  stop running your DataSync Agent  before making any Agent configuration changes. Procedure To enable upsert to your database, follow these steps: