Need help in tablespace [message #635459] |
Mon, 30 March 2015 10:51 |
|
dark_prince
Messages: 121 Registered: June 2013 Location: India
|
Senior Member |
|
|
I want to create a tablespace which going to store record more than 10 lakh
so for that I have created this :-
CREATE TABLESPACE MWF_TABLESPACE
DATAFILE 'MWF_TABLESPACE.dat' SIZE 50M
DEFAULT STORAGE
(
INITIAL 10M NEXT 50M
MINEXTENTS 1 MAXEXTENTS 999
PCTINCREASE 10
)
ONLINE;
I want to know the size, initial, minextents maxextents and pctincrease which I have are given correct or not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Need help in tablespace [message #635503 is a reply to message #635459] |
Tue, 31 March 2015 03:42 |
John Watson
Messages: 8931 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Perhaps the whole question is not relevant to the real world. If I remember correctly, XE release 10.x has a hard limit of 4GB for user data. So all you need do is create your tablesapce with a single file, autoextend on, and watch it grow as necessary up to that limit.
I have no idea if your data wll fit within that limit (what is a "lakh"? It is certainly not an SI unit) but you can work that out. Insert a few million rows, look at the space occuped, and extrapolate accordingly.
|
|
|
|
|
|
|
Re: Need help in tablespace [message #635578 is a reply to message #635576] |
Wed, 01 April 2015 10:57 |
gazzag
Messages: 1118 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
I would make two slight changes:
CREATE TABLESPACE EXP_TABLESPACE
DATAFILE 'EXP_TABLESPACE01.dbf' SIZE 1GB
AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
ONLINE;
The convention for Oracle datafiles is a suffix of ".dbf" as well as to enumerate them. You may not feel that you will need to add a EXP_TABLESPACE02.dbf in the future but why constrain yourself now?
|
|
|
|
|
|
|
Re: Need help in tablespace [message #635597 is a reply to message #635580] |
Thu, 02 April 2015 02:46 |
gazzag
Messages: 1118 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
You're welcome. But Joy Division makes a very good point. You should fully qualify the pathname when creating your datafile. In Windows a good convention with XE might be something like:
CREATE TABLESPACE EXP_TABLESPACE
DATAFILE '<drive_letter>\oracle\oradata\XE\EXP_TABLESPACE01.dbf' SIZE 1GB
AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
ONLINE;
|
|
|
Re: Need help in tablespace [message #635598 is a reply to message #635583] |
Thu, 02 April 2015 03:20 |
gazzag
Messages: 1118 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
Quote:Now it seems the attitude is to just make everything up as you go and every developer/DBA/SA for himself when it comes to quaint notions of 'standards'.
Agreed. In my experience this is a result of companies wanting to minimise expenses with IT as much as anything else. It results in cheaper paid and, therefore, less qualified staff being hired to "build" a system pretty much as they see fit. These staff, by definition, will have little or no knowledge of any existing methodologies or standards that us dinosaurs have been brought up with. Google is a fantastic tool once you have the right background in a given field - I can achieve so much more with its help than in the olden days of looking through shelves-full of documentation some of which might be outdated, incorrect and/or missing.
For example, these days I could probably Google my way to building you a house. Sadly I wouldn't be able to guarantee how long it would stand up for so you might as well pay me to live in it with you, fixing any issues as and when they arise. Unfortunately, it'll end up costing you much more than getting a qualified builder to do the work in the first place. Oh, wait...
|
|
|
Re: Need help in tablespace [message #635599 is a reply to message #635597] |
Thu, 02 April 2015 03:20 |
John Watson
Messages: 8931 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
People whose opinions i respect have contributed to this. But I do not agree. I try to forget all the naming covention stuff, and use OMF instead.
When OMF was first introduced, in 9.x, I thought "I'm a real DBA: I don't need this stuff". Then I stared thinking "Well, for low end systems where the client doesn't have a full time fully skilled DBA, OK, OMF is OK". Now, I use it everywhere I can. If you want to override the defaults for the initial file size, the max size, and te increment size, you can. You get sensible paths and names (or simalar tags on ASM). It makes all file management (including database duplication) so much easier.
You can't argue with this:orclz>
orclz> create tablespace jwts datafile size 1g;
Tablespace created.
orclz>
|
|
|
|
|
|
Re: Need help in tablespace [message #635641 is a reply to message #635640] |
Fri, 03 April 2015 21:37 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
dark_prince wrote on Fri, 03 April 2015 18:00I wanted to know on an average how many rows are going to stored in tablespace if its size is 1gb.
what is the average row length?
just do the simple math.
|
|
|