Is there a benefit to separate a DB to Schemas (performance-wise) if you use EF core
There are a lot of performance measures. What are you trying to improve?
I assume you mean grouping tables, views, stored procedures, etc by schema as apposed to every table being in the same (dbo) schema. The benefit of using schema is security. User can only see the schema they have access to. You can learn about schema
as the following links.
the first table mapping takes too long for EF. can we decrease it using this way?
or just use partial contexts for it?
You could try to use partial contexts. But there is not much you can do for EF core. If its absolute performance you need then, maybe something more light weight like Dapper you want to consider.
Member
92 Points
534 Posts
Is there a benefit to separate a DB to Schemas (performance-wise) if you use EF core
Aug 01, 2019 06:31 AM|fatihbarut|LINK
hi all,
Is there a benefit to separate a DB to Schemas (performance-wise) if you use EF core
All-Star
53081 Points
23654 Posts
Re: Is there a benefit to separate a DB to Schemas (performance-wise) if you use EF core
Aug 01, 2019 10:54 AM|mgebhard|LINK
There are a lot of performance measures. What are you trying to improve?
I assume you mean grouping tables, views, stored procedures, etc by schema as apposed to every table being in the same (dbo) schema. The benefit of using schema is security. User can only see the schema they have access to. You can learn about schema as the following links.
https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-schema?view=sql-server-2017
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-schema-transact-sql?view=sql-server-2017
Member
92 Points
534 Posts
Re: Is there a benefit to separate a DB to Schemas (performance-wise) if you use EF core
Aug 07, 2019 06:02 PM|fatihbarut|LINK
no, I meant for example the first table mapping takes too long for EF. can we decrease it using this way?
or just use partial contexts for it?
Contributor
2253 Points
735 Posts
Re: Is there a benefit to separate a DB to Schemas (performance-wise) if you use EF core
Sep 03, 2019 02:38 AM|Xing Zou|LINK
You could try to use partial contexts. But there is not much you can do for EF core. If its absolute performance you need then, maybe something more light weight like
Dapper
you want to consider.https://github.com/aspnet/EntityFrameworkCore/issues/1906