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

is it possible to specify Tablespace on Entity Framework core OnModelCreating #188

Open
omora opened this issue Aug 11, 2021 · 7 comments
Open

Comments

@omora
Copy link

omora commented Aug 11, 2021

For tables and indexes?
Thanks

@alexkeh
Copy link
Member

alexkeh commented Aug 11, 2021

No, there isn't. What are you trying to accomplish by specifying a tablespace?

@omora
Copy link
Author

omora commented Aug 12, 2021

When we apply the migration to create the database table and indexes it generates:
-- Create table
create table A01ARQ01.ARQ_EMAIL_ADJUNTO
(
"Id" RAW(16) not null,
"NombreFichero" NVARCHAR2(255),
"Binario" BLOB,
"EmailId" RAW(16) default '00000000000000000000000000000000' not null
)
tablespace ASSM_ARQAUD_DAT;
-- Create/Recreate indexes
create index INX_ARQ_EMAIL_ADJUNTO_01 on ARQ_EMAIL_ADJUNTO (EmailId)
tablespace ASSM_ARQAUD_DAT;
-- Create/Recreate primary, unique and foreign key constraints
alter table ARQ_EMAIL_ADJUNTO
add constraint INX_ARQ_EMAIL_ADJUNTO_PK primary key (ID)
using index
tablespace ASSM_ARQAUD_DAT;
alter table ARQ_EMAIL_ADJUNTO
add constraint FK_ARQ_EMAIL_ADJUNTO_ARQ_EMAIL_EmailId foreign key (EMAILID)
references ARQ_EMAIL (ID) on delete cascade;

It uses the default tablespace for the schema
Our DBA demand to create index tablespaces in a different one
create index INX_ARQ_EMAIL_ADJUNTO_01 on ARQ_EMAIL_ADJUNTO (EmailId)
tablespace ASSM_ARQAUD_IND;
and
alter table ARQ_EMAIL_ADJUNTO
add constraint INX_ARQ_EMAIL_ADJUNTO_PK primary key (ID)
using index
tablespace ASSM_ARQAUD_IND;

The work around is not to use migrations and create the tables and index with SQL , the traditional way.

it's a shame that because of this feature we can't use migrations

@alexkeh
Copy link
Member

alexkeh commented Aug 12, 2021

@omora Thanks for brining this to the Oracle EF Core team's attention. I filed an enhancement request (33219678) to have the dev team take a look.

We will prioritize ERs based on customer interest.

@tisonv
Copy link

tisonv commented Nov 21, 2024

any updates on that matter ?

@alexkeh
Copy link
Member

alexkeh commented Nov 21, 2024

@tisonv There has been limited progress. Compared to other feature requests, the community has not upvoted this feature. As of today, there has only been one upvote.

@tisonv
Copy link

tisonv commented Nov 21, 2024

Thenk you @alexkeh

Not sure 1 more vote would help.

Historically we split table datas and indexes on separate tablespaces.
While it seems the majority of oracle admins do not do that anymore since forever, some still preach some benefits (Only one I see is different HDs with different specs to make a real impact)

As a senior principal product manager at Oracle, would you say it's now useless to separate the datas and indexes ?

@alexkeh
Copy link
Member

alexkeh commented Nov 21, 2024

If your organization needs it, I recommend you vote for it. Other features were upvoted, and they are being prioritized.

Separating data and indexes usually makes little difference to performance. The bigger benefit can come from the DB administration perspective. Some DBAs find it easier to monitor growth and other management tasks by keeping them separate. Of course, this comes down to personal preference.

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

No branches or pull requests

3 participants