You are not logged in.
Ive noticed that CreateMissingTables on external Tables is pretty slow when the Model is quite Big.
Is there an prefered way to work around that ?
At example by defining more models and loading them when needed or something like that ?
When i understand it right, thats basically becouse mormot fires an select to any registered table (to get Field names?)
Maybe its possible to do that asynchronious later or something like that ?
Offline
I never encountered this problem, but I didn't use huge models with external databases, and rather use SQLite3 with a few tables.
There is no asynch/delayed way.
But you can try to set the rpmNoCreateMissingTable, rpmNoCreateMissingField options when registering the external tables, unless you know that the model changed - e.g. after a setup, you just set a flag to in the application settings.
Edit: after more investigation, I guess GetFields is always called in TSQLRestStorageExternal.Create, since we need the actual DB fields raw information for proper process...
If GetFields is the culprit of being slow, you wouldn't make it faster.
Could you try to debug and benchmark which method takes time in your configuration.
Or at least enable verbose logs and check the timestamps, which will give information about the timing in TSQLRestStorageExternal.Create.
Offline