khurram


{ City } islamabad
< Country > pakistan
* Profession * ps consultant
User No # 50847
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 17
Users Marked my Answers as Wrong # 1
Questions / { khurram }
Questions Answers Category Views Company eMail




Answers / { khurram }

Question { 25331 }

Please tell me a query to find the Primary key,Foreign
key,primary Index,PPI for the Database?


Answer

--Find indixes.
Select TableName,ColumnName,IndexType,UniqueFlag,IndexName
From DBC.Indices
Where tableName='mytable_name'

Is This Answer Correct ?    6 Yes 1 No

Question { 25331 }

Please tell me a query to find the Primary key,Foreign
key,primary Index,PPI for the Database?


Answer

Hi Parsad,
I hope by running below query you'll get many part of your
answer.

_----------------------------------------------------------_
Select DatabaseName, TableName ,columnName,
Case When IndexType='K' Then 'Primary Key'
When IndexType='S' Then 'Secondary Index'
When IndexType='P' Then 'Primary Index'
When IndexType='Q' Then 'PPIndex'
When IndexType='J' Then 'Join Index'
End as implimented_Index
From DBC.Indices
Where TableName in
( Select distinct TableName
From DBC.Tablesize
Where DatabaseName <>'DBC'
And
CurrentPerm>0
)
Order by 1,2,3



_
Innocent

Is This Answer Correct ?    6 Yes 0 No


Question { 13865 }

Hi All,
can anyone tell me how many types of Skew exists? whats the
difference between amp skew,data skew,cpu skew, io skew,
delta amp cpu ?


Answer

How many types of Skew exists?

If you utilized unequally TD resources(CPU,AMP,IO,Disk and
etc) this is called skew exists. Major are 3 type of skews
(CPU skew,AMP/Data skew, IO Skew).

-Data skew?
When data is not distribuited equally on all AMPs.
-Cpu skew?
Who is taking/consuming more CPU called cpu skew.
-IO skew?
Who perform more IO Operation. called IO Skew.

Is This Answer Correct ?    5 Yes 0 No