Phantom Reads?

  • One small detail to add that might or might not be relevant....the stored procs used in the "collection" phase of Process B is using a "select top 5000", which is something else I have considered getting rid of...it seems like I've run across some articles or posts related to issues with this sort of thing in previous investigations, but of course I can't find them now that I am interested in that topic...

  • Maybe I overwhelmed with detail, so I'll try to restate my question more simply:

    Process B is running a big select. Process A is inserting data in a transaction. The data involved in the transaction from process A could qualify for the select running in process B, but only while the transaction is open - when the transaction is complete, it should not qualify. What is the best way to make sure that Process B can't see data inserted by Process A unless it is really, truly committed?

    I believe that the answer is that Process B's select statement needs to be running in a transaction with isolation level Serializable. Can anyone confirm that I am understanding the documentation correctly - that I am really dealing with what is referred to as "phantom reads", and that this is the proper way to avoid them?

Viewing 2 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply