• As this article says many programmers do check for the existence of the record before inserting is true but its done by only those sql programmers either who are lazy to learn or they are brand new.

    But the experience programmers, try to do the UPDATE first based on the key then check the updated rowcount. if its equal to zero or less than 1 based on your update query, you do the INSERT.

    When I ready about the UPSERT's underlying commands it seems like its doing the same thing.

    By all means, this article is a great one and let hope this will help lot of programmers as well as DBA help increasing their performance.

    One note that lot of people beginners as well as experience programmers think that reading the DB for record existence doesn't cost that much but if you do look at the statistics you will come to know how much its costs.

    Once again thanks for sharing this information. Great job!