Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster Insert row #39

Open
schmitch opened this issue Dec 23, 2013 · 1 comment
Open

Faster Insert row #39

schmitch opened this issue Dec 23, 2013 · 1 comment

Comments

@schmitch
Copy link

Currently I only read the docs and i read this:

If Id is set to a positive integer, Save would query the count of the row to find
out if the row already exists, if not then execute INSERT statement.
otherwise execute UPDATE.

This is not the best solution, since you need 3 queries to check if a row exists.
It would be way easier to just update the row. Check if the query was successfull or greater than zero and if not just insert the statement.

@coocood
Copy link
Owner

coocood commented Dec 23, 2013

I will take a look at it this weekend, thank you for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants