How to improve insert performance

How can I improve performance for an insert in SQL? The insert is being done into a table from more than one session, one from a VB front end and the other from a Unix back end. The table has three indexes and many constraints.

    Requires Free Membership to View

First, trace your insert session and see how time is being spent. One common problem with inserts is SQL that uses literal values rather than bind variables, meaning that instead of one SQL statement that can be reused, you have many SQL statements that are each parsed once. If you see many SQL statements in your trace file that differ only in their literal values, change your application to use a single statement that is bound to different values each time it's executed.

This was first published in June 2006

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.