One of the severe performance limits on heap tables that use allpages locking is that the page must be locked when the row is added, and that lock is held until the transaction completes. If many users are trying to insert into an allpages-locked heap table at the same time, each insert must wait for the preceding transaction to complete.
This problem of last-page conflicts on heaps is true for:
Single row inserts using insert
Multiple row inserts using select into or insert...select, or several insert statements in a batch
Bulk copy into the table
Some workarounds for last-page conflicts on heaps include:
Switching to datapages or datarows locking
Creating a clustered index that directs the inserts to different pages
Partitioning the table, which creates multiple insert points for the table, giving you multiple “last pages” in an allpages-locked table
Other guidelines that apply to all transactions where there may be lock conflicts include:
Keeping transactions short
Avoiding network activity and user interaction whenever possible, once a transaction acquires locks