My connection is using SOAP to write to Salesforce instead of Bulk, which is much slower. How can I speed this up?
Please review the SOAP vs Bulk API documentation to ensure that you're meeting the requirements for using Bulk.
To confirm whether you are inserting consecutive changes to the same mapping, you can use this query. Note that it can be fairly slow depending on how many updates are in your
_trigger_log table. If your connection uses a custom schema, change
<yourschema>._trigger_log in the innermost query.
select min(table_name) as mapping, min(created_at) as first_created_at, count(*) as consecutive_rows from ( select t1.*, sum(group_flag) over (order by created_at) as grp from ( select *, case when lag(table_name) over (order by created_at) = table_name then null else 1 end as group_flag from salesforce._trigger_log ) t1 ) t2 group by grp order by 2;