Showing posts with label split. Show all posts
Showing posts with label split. Show all posts

Monday, March 12, 2012

Placing Filegroups on separate drives

Hi All,

I have adatabase which is over 150GB in size and an estimated size of 1 Terabyte. I am planning to split the database into various filegroups. I have already separated the indexes and data from the Database. My Tempdb is in separate physical drive.

I was thinking if it’s a good idea to place each filegroup into a separate drive. The drives are not physical drives but partitioned, however the drive I portioned is raid 1+0.

Would I get any great performance benefit of placing filegroups on their own drives ?

Placing the filegroup structure below.

No

Filegroup

Drive

1

PRIMARY

F

2

LOG

J

3

AD_Data

G

4

AD_Indexes

H

5

CV_Data

I

6

CV_Indexes

J

7

DIM_Data

K

8

DIM_Indexes

L

9

FACT_Data

M

10

FACT_Indexes

N

11

STAGING_Data

O

12

STAGING_Indexes

P

13

ORG_Data

Q

14

ORG_Indexes

R

15

TMP_Data

S

16

TMP_Indexes

T


Any help would be appreciated

Thx

It depends whether these drives have separate controllers or not. If so, then its possible that a query accessing data in separate files groups will use multiple contollers so the data can be access simultaneously giving better performance. If they all use the same controller then performance will be be helped. If one or more tend to grow more quickly they could be put on separate drives and auth growth paramters might be different but that really isn't peformance related unless auto growth occurs during an INSERT or UPDATE. It may be faster to autogrow one smaller filegroup than one huge database.

My 2 cents

placing a new line character

hi all

i have a filed in my database with name address which contains addresses.

i want to split address in multiple line .

LIke

addressline1

addressline2

addressline3

i.e

Robart Peter

4th Banglow road

MC city

can any one help me.

vbNewLine or vbcrlf functions can be used to wrap the content to next line.|||thanks

placing a new line character

hi all

i have a filed in my database with name address which contains addresses.

i want to split address in multiple line .

LIke

addressline1

addressline2

addressline3

i.e

Robart Peter

4th Banglow road

MC city

can any one help me.

vbNewLine or vbcrlf functions can be used to wrap the content to next line.|||thanks

Friday, March 9, 2012

PL/SQL help - split an address

I have a single address column that i want to split.
For example I have an address with carriage returns like:

address
----------
Administration Tech Services

1234 Elm Avenue

West Building

I would like a SELECT query to split this address column into 3 like:
address address2 address3
---- ---- ----
Administration Tech Services 1234 Elm Avenue West BuildingYou may need to create a function like this:
Create Or Replace Function Get_Addr
(P_Line Number, P_Addr Varchar2)
Return Varchar2 Is
Type Addr_Typ Is Table Of Varchar2(1000);
V_Addr Addr_Typ;
V_Tmp Varchar2(1000);
I Pls_Integer;
J Pls_Integer;
K Pls_Integer;
L Pls_Integer;
Begin
V_Tmp:=Rtrim(P_Addr)||Chr(10);
For I In 1..P_Line Loop
V_Addr(I):='';
End Loop;
I:=0;
L:=Length(V_Tmp);
While (L > 0)
Loop
K:=Instr(V_Tmp,Chr(10));
If K = 0 Then
Exit;
End If;
J:= K-1;
If J > 0 Then
I:=I+1;
V_Addr(I):= Substr(V_Tmp,1,J);
V_Tmp:=Rtrim(Substr(V_Tmp||' ',K+1));
End If;
L:=Length(V_Tmp);
End Loop;
Return V_Addr(P_Line);
End;
/
And use it like:

UPDATE MyAddrTab
SET Address2=Get_Addr(2,Address)
, Address3=Get_Addr(3,Address);
COMMIT;
UPDATE MyAddrTab
SET Address=Get_Addr(1,Address);
COMMIT;
:eek:

PS: You will need to validate parameters!