_NOPE_ Posted June 25, 2019 Share Posted June 25, 2019 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. I'm out. Link to comment Share on other sites More sharing options...
chigiabelo Posted June 25, 2019 Share Posted June 25, 2019 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 More sharing options...
_NOPE_ Posted June 26, 2019 Share Posted June 26, 2019 Moving my chat on this project over to this thread now, and you can help if you want to now. I'm out. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now