Jump to content

Anyone know how to read/see posts in the old forums?


Zep

Recommended Posts

Is trying to insert the data REALLY faster than doing a check? Aren't they both essentially just one database call each? I mean, I can try it to see if that speeds things up, but... I'm skeptical.

 

Well, your mileage may vary, but in my case, I think it depends on how the db server executes the check. We were taking a massive 200+MB csv file and sending each row to the server to be inserted and the query doing the insert had a complicated WHERE clause to check for uniqueness. When we tried the constraint method, it was much faster. Also, if you're going into MySQL instead of SQL Server, it may have a different way of doing things. If I get some time, I'll try to quantify the savings.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...