Replies: 14 comments
-
Please make this an option! We will definitively stick with stored procedures and handle any schema changes ourselves, as it absolutely has a performance impact. |
Beta Was this translation helpful? Give feedback.
-
@gentledepp |
Beta Was this translation helpful? Give feedback.
-
Yes, but if you do not use stored procedures, you will likely use dynamic sql (or what Entity Framework uses: sp_exec('')) So please at least give us a chance to stick with the good-old pattern. 😅 As a side-note: I am currently trying to bring some of our requested features to DMS in our separate repo and tracking these as our own issues: https://github.com/gentledepp/Dotmim.Sync Additionally, stored procedures give us the ability to make major changes to how DMS syncs.
That way, we have the whole sync process under control and are most flexible. How would this be done without stored procedures? |
Beta Was this translation helpful? Give feedback.
-
Oh god @gentledepp, I hate you 🗡️ !!!! For instance I would want to add the scopename in it, so far, we can make a smooth upgrade when required. We have today a stored proc called
Is it something that could help for migration ? |
Beta Was this translation helpful? Give feedback.
-
1st of all: I cannot allow you anything since you are the owner ;-) 3rd: I do not quite get the Automatic scope-migration is something that I plan to implement myself, but it will only support adding nullable columns and adding new tables |
Beta Was this translation helpful? Give feedback.
-
The idea is to have different scopes for different version. Let's say you are creating the scope You decide to add new columns and new tables That means I need two version of the stored proc (for Make sense ? |
Beta Was this translation helpful? Give feedback.
-
Yes it does, but you can already do this using custom stored procedure pre- and postfixes, right? |
Beta Was this translation helpful? Give feedback.
-
I think it will remove the older stored proc to rename them. It seems to me that it's making more sense to base versioning and upgrade on scope name, right ? |
Beta Was this translation helpful? Give feedback.
-
Hmmm... well it depends on what exactly you want to change.
I would rather follow the following approach:
Does that make sense to you? |
Beta Was this translation helpful? Give feedback.
-
That why I wanted to remove the stored procedures actually.
Today if you're adding a new column in a table (nullable), it will still work for
That's the main purpose of scopes. Making the schema evolving and smoothly migrate the clients.
Are you heavily modifying the stored procedures once created ? |
Beta Was this translation helpful? Give feedback.
-
Well, my idea is basically, to modify dotmim.sync so that schema/scope changes (adding nullable columns, adding tables) does not break any clients. Instead, DMS should just add the new tables/columns on the client-side. But this would be able to evolve like a REST API:
As a client app developer, the only thing you'd need to make sure is that you never use
We needed to modify the following 3 areas:
|
Beta Was this translation helpful? Give feedback.
-
@gentledepp I am interested in what you stated about extracting the SQL and letting EF MIgrations handle the adding of the triggers and sprocs. I am using EF also, on server against SQL Server and mobile against Sqlite. this process might remove some steps i have now, the mobile client does a check to see if it needs to be updated or if it can sync before every sync. This way the clients now when they need to update which is Deprovision , EF Migration, then Provision. Sounds like with ur solution, migration can be called at app (web and mobile) start up. |
Beta Was this translation helpful? Give feedback.
-
@Mimetis I agree with @gentledepp having the option to have dynamic sproc would be my preferred option of choice. |
Beta Was this translation helpful? Give feedback.
-
how to disable stored procedures |
Beta Was this translation helpful? Give feedback.
-
I think I will remove all the stored procedures (in SQL / MYSQL) in a future version.
Many reasons for that:
Setup
even after a first sync, that meansDMS
has to take care of already created stored procedures. Quite complicatedSQL
engine performances between generated SQL and stored procedures are almost the sameSetup
objectMySQL
it could increase the performances (mainly because the stored proc is called on every lines...Pitfalls
DMS
in memory cache will increase a little bit, but not too muchYour thought ?
Beta Was this translation helpful? Give feedback.
All reactions