Clustered Versus Create Table On High Speed FILEGROUP

Nov 30, 2005

Hi,

I am expanding our data warehouse solution with new filegroups on
several subsystems.

I want to know which idea is better!

- create clustered indexes on tables to 'move' them to new filegroups
- create these tables on the new filegroups.

The background of this question is as follows:

- we want the whole data on the new filegroups
- we want to know if there is any difference in performance between the
2 solutions

Thanks in advance,
Danny

View 4 Replies


ADVERTISEMENT

DB Design :: Script To Create Table With Primary Key Non-clustered And Clustered Index

Aug 28, 2015

I desire to have a clustered index on a column other than the Primary Key. I have a few junction tables that I may want to alter, create table, or ...

I have practiced with an example table that is not really a junction table. It is just a table I decided to use for practice. When I execute the script, it seems to do everything I expect. For instance, there are not any constraints but there are indexes. The PK is the correct column.

CREATE TABLE [dbo].[tblNotificationMgr](
[NotificationMgrKey] [int] IDENTITY(1,1) NOT NULL,
[ContactKey] [int] NOT NULL,
[EventTypeEnum] [tinyint] NOT NULL,

[code]....

View 20 Replies View Related

Create Clustered Or Non-clustered Index On Large Table ( SQL Server 7 )

Jan 4, 2008

I have large table with 10million records. I would like to create clustered or non-clustered index.

What is the quick way to create? I have tried once and it took more than 10 min.

please help.

View 1 Replies View Related

Sql Query Speed 2000 Versus 2005

Aug 15, 2007

We have an interesting problem. We are attempting to migrate from sql 2000 to sql 2005. the schema we have is exactly the same. the new 2005 box is more powerful than our 2000 box.

here is our schema:

tbl_Items
ItemID int pk
ReferenceID int
sessionid varchar(255)
StatusID int

tbl_ItemsStatus
statusid int pk
isinternalstatus bit

there is an index on (ReferenceID, SessionID, StatusID) and (SessionID, StatusID)

this is the query:

DECLARE @referenceid INTEGER
SET @referenceid = 1019

SELECT MAX(i2.itemid)
FROM tbl_Items i2 (NOLOCK)
JOIN tbl_ItemsStatus s (NOLOCK)
ON i2.StatusID = s.StatusID
WHERE
s.IsInternalStatus = 0
AND i2.referenceid = @referenceid
AND i2.sessionid IN (
SELECT i3.sessionid
FROM tbl_Items i3 (NOLOCK)
WHERE
i3.referenceid = @referenceid
AND i3.status <> 7
AND i3.status <> 8
AND i3.status <> 10
AND i3.itemid IN (
SELECT max(i4.itemid)
FROM tbl_Items i4 (NOLOCK)
WHERE i4.referenceid = @referenceid
GROUP BY i4.sessionid
)
AND i3.itemid NOT IN (
SELECT MAX(i7.itemid )
FROM tbl_Items i7 (NOLOCK)
WHERE
i7.referenceid = @referenceid
AND i7.SessionID IN (
SELECT i5.SessionID
FROM tbl_Items i5 (NOLOCK)
WHERE
i5.status <> 11
AND i5.referenceid = @referenceid
AND i5.itemid IN (
SELECT MAX(i6.itemid)
FROM tbl_Items i6 (NOLOCK)
WHERE
i6.referenceid = @referenceid
AND i6.status IN (7,11,8)
GROUP BY i6.sessionid
)
)
GROUP BY i7.SessionID
)
)

GROUP BY i2.sessionid

we know this query is pretty bad and can be optimized. however, if we run this query as is on 2005 it takes about 2 hours to run...if we run the exact same query on 2000 it takes 9 seconds.

so this query on 2005 if run takes 2 hours..however, if we omit the s.IsInternalStatus = 0 or the i2.referenceid = @referenceid line it takes about 9 seconds.

why would this be? it makes no sense why omitting one of those where clauses would increase the performance of the query by 2 hours? we know its a bad query...but this doesnt make sense.

any one else run into this problem?

View 1 Replies View Related

High Cpu, Low Speed

May 17, 2006

i have high cpu problem. i don't know why many .net sqlclinet dataprovider and IIS hold so much cpu resource. by the way, memerycondition is normal.when i restart sqlserver, from windows task manager, i see the cpu timeof sqlserver.exe process is low, but it grows gradually, and in twodays, it can grow to as high as 2:xx:xx.any one can tell me why .net sqlclinet data provider and IIS hold somuch cpu resource? and why cpu time of sqlserver.exe grows gradually?thanks a lot.below is the part of a trace report:TextDataApplicationNameDurationStartTimeReadsWritesCPUNULL.Net SqlClient Data Provider189123357:46.529168411040076NULL.Net SqlClient Data Provider277798310:19.27923583730414NULL.Net SqlClient Data Provider189504657:42.722503411526282NULL.Net SqlClient Data Provider189957657:38.2161560740425570NULLInternet Information Services43009602:52.77042962721518NULL.Net SqlClient Data Provider277362310:19.16577581019828NULL.Net SqlClient Data Provider68673308:21.03144731014904NULLInternet Information Services33395630:11.666142618512188NULLInternet Information Services60609310:07.49384117111124NULL.Net SqlClient Data Provider37281323:04.9111621010686NULL.Net SqlClient Data Provider170658028:33.72410832077626NULLInternet Information Services64606024:35.3238936207390NULL.Net SqlClient Data Provider109062338:32.911946207109NULL.Net SqlClient Data Provider89465642:20.85394306778NULL.Net SqlClient Data Provider78986006:40.766466706483NULL.Net SqlClient Data Provider68856331:44.82884206420NULL.Net SqlClient Data Provider79023344:29.73802006077NULL.Net SqlClient Data Provider56975000:21.587254356049NULL.Net SqlClient Data Provider110423338:12.911020565453NULL.Net SqlClient Data Provider56978000:21.5111749415217NULL.Net SqlClient Data Provider149207631:42.65649825122NULL.Net SqlClient Data Provider142872027:40.27825734877NULL.Net SqlClient Data Provider173951628:27.111265694653NULL.Net SqlClient Data Provider169073328:26.59107804640NULL.Net SqlClient Data Provider40656306:52.74912304391NULL.Net SqlClient Data Provider56973601:17.73792804344NULL.Net SqlClient Data Provider87886028:25.46157204280NULL.Net SqlClient Data Provider78981306:40.7160337554279NULL.Net SqlClient Data Provider28615610:42.01521704172NULL.Net SqlClient Data Provider180126328:07.98573904138NULL.Net SqlClient Data Provider26623352:11.54391104048NULL.Net SqlClient Data Provider42412613:13.33311404046NULL.Net SqlClient Data Provider45828349:48.71569404014NULL.Net SqlClient Data Provider59893648:20.44212603983NULLInternet Information Services38987657:32.910983643923NULL.Net SqlClient Data Provider40825051:56.11565203922NULL.Net SqlClient Data Provider44153050:05.41727103906NULL.Net SqlClient Data Provider49392303:29.66312503890NULL.Net SqlClient Data Provider35761025:20.51493003797NULL.Net SqlClient Data Provider35456343:38.81570403782NULL.Net SqlClient Data Provider37890649:44.61523103689NULL.Net SqlClient Data Provider36323643:30.21596403673NULL.Net SqlClient Data Provider43392348:08.21566003672NULL.Net SqlClient Data Provider22059321:53.91434903645NULL.Net SqlClient Data Provider184018628:04.68771003637NULL.Net SqlClient Data Provider40776351:38.71646203595NULL.Net SqlClient Data Provider40970350:47.01393003389NULL.Net SqlClient Data Provider65773645:36.83863503376NULL.Net SqlClient Data Provider44501348:17.71387003342NULL.Net SqlClient Data Provider40331351:24.91290503266NULLInternet Information Services60418628:05.5146475413035NULLInternet Information Services60220337:13.79609252955NULL.Net SqlClient Data Provider34518623:32.612010402955NULL.Net SqlClient Data Provider30251314:52.01217902937NULL.Net SqlClient Data Provider37945357:47.331948102891NULL.Net SqlClient Data Provider35692347:15.61096402564NULL.Net SqlClient Data Provider37964019:33.51062602453NULL.Net SqlClient Data Provider161006329:47.711812422391NULL.Net SqlClient Data Provider75999648:30.68796232376NULL.Net SqlClient Data Provider76001348:30.65651302187NULL.Net SqlClient Data Provider158300030:14.79316502157NULLInternet Information Services55791032:46.851272111967NULLInternet Information Services25312653:29.67935541893NULL.Net SqlClient Data Provider95000027:14.33036801875NULL.Net SqlClient Data Provider56968607:22.5112528421842NULLInternet Information Services21875054:04.03855301811NULL.Net SqlClient Data Provider126831335:28.4162994581782NULL.Net SqlClient Data Provider141667332:47.97308401674NULLInternet Information Services55525047:41.07781181639NULL.Net SqlClient Data Provider88247028:21.84272901638NULLInternet Information Services25129653:31.553638181626NULL.Net SqlClient Data Provider88981328:14.44857501625NULLInternet Information Services19851600:16.159345501580NULL.Net SqlClient Data Provider56970601:17.77347301576NULLInternet Information Services52651647:51.24524581565NULL.Net SqlClient Data Provider37881326:26.96875301467NULL.Net SqlClient Data Provider81989043:15.75487301312NULLInternet Information Services37651632:48.275602141297NULL.Net SqlClient Data Provider30257614:51.91455351801266NULL.Net SqlClient Data Provider94970357:49.66191501238NULL.Net SqlClient Data Provider34781323:29.93622901203NULL.Net SqlClient Data Provider76679630:17.53368101170NULL.Net SqlClient Data Provider107081039:00.44675901109NULL.Net SqlClient Data Provider49532648:22.548276101095NULL.Net SqlClient Data Provider50011048:49.252299511078NULL.Net SqlClient Data Provider37954657:49.7448401062NULL.Net SqlClient Data Provider88336028:20.94006501049NULL.Net SqlClient Data Provider24511033:33.0489701032NULL.Net SqlClient Data Provider88495328:19.33754801031NULL.Net SqlClient Data Provider60478303:26.6451490968NULL.Net SqlClient Data Provider49395303:29.5640980955NULL.Net SqlClient Data Provider54786019:17.0377930938NULLInternet Information Services29589006:38.7446491907NULL.Net SqlClient Data Provider33442300:18.767960891NULL.Net SqlClient Data Provider86037628:43.9126870858NULLInternet Information Services40493639:47.8471172843NULL.Net SqlClient Data Provider68973331:53.8315881796NULL.Net SqlClient Data Provider50568649:43.33473121796NULL.Net SqlClient Data Provider50345348:13.1276641764NULL.Net SqlClient Data Provider72609348:20.5210820702NULL.Net SqlClient Data Provider24520333:32.9381320688NULL.Net SqlClient Data Provider28625010:41.9285548686NULL.Net SqlClient Data Provider173781330:13.5169100659NULL.Net SqlClient Data Provider34089023:36.953030625NULL.Net SqlClient Data Provider34144023:36.327820625NULL.Net SqlClient Data Provider41397050:40.9287224610NULL.Net SqlClient Data Provider34073323:37.0213300608NULL.Net SqlClient Data Provider53148348:02.7270060595NULL.Net SqlClient Data Provider35764025:20.5402862594NULL.Net SqlClient Data Provider56892033:54.6284070593declare @P1 int set @P1=1033 declare @P2 int set @P2=20644 execp_splitpage @sql = 'SelectUserName,Status,Qymc,Qylb,areaCode1,SiteHits,Zycp, CONVERT(varchar(300), Qyjj) AS Qyjj,QyjjStatus,compPhone,compFax From UserInfoWhere isValid=1 and Right(Status,1).Net SqlClient DataProvider481308:18.211296955578NULL.Net SqlClient Data Provider49670348:13.6268720563NULL.Net SqlClient Data Provider49137349:58.5275230562NULL.Net SqlClient Data Provider37967019:33.5404290562NULLInternet Information Services39212632:22.61511612543NULL.Net SqlClient Data Provider51453048:13.0228450532NULL.Net SqlClient Data Provider65514048:42.740750531declare @P1 int set @P1=5587 declare @P2 int set @P2=55867 execp_splitpage @sql = 'SelectInfo.picPath,Info.Info_ID,Info.postUser,Info.infoT ype,Info.infoLevel,Info.infoDirect,Info.showname,I nfo.postDateTime,Info.areaCode,CONVERT(varchar(300), Info.conten.Net SqlClient DataProvider94014:55.0139021180516exec p_splitpage 'SelectID,UserName,PassWord,Qymc,RegisterTime,name,Phone From UserInfo WhereisValid = 1 and UserName like ''%nick%'' andSUBSTRING(Status,2,3)=''019'' Order By ID DESC',0,30InternetInformation Services131335:39.814030516NULL.Net SqlClient Data Provider24104607:30.7216430514NULL.Net SqlClient Data Provider56918635:46.737300499NULL.Net SqlClient Data Provider36893650:51.7199720486NULL.Net SqlClient Data Provider102501628:10.9231642485NULL.Net SqlClient Data Provider54798619:16.9340860485NULL.Net SqlClient Data Provider42397013:13.4397300483NULL.Net SqlClient Data Provider37964012:11.1330690470NULLInternet Information Services18441037:30.3261545468NULL.Net SqlClient Data Provider43448606:16.9191610468NULL.Net SqlClient Data Provider36296652:15.4190060436NULLInternet Information Services11064001:43.984251422NULL.Net SqlClient Data Provider37975057:40.8210330419NULL.Net SqlClient Data Provider5279655:44.9159260406NULL.Net SqlClient Data Provider33442300:18.7325502392NULLInternet Information Services11436047:40.4148070390NULL.Net SqlClient Data Provider39812636:26.138510343NULL.Net SqlClient Data Provider155228331:21.2164340329NULL.Net SqlClient Data Provider4187655:55.8164293328NULL.Net SqlClient Data Provider36928023:08.5144192328Select Count(ID) From UserInfo Where isValid=1 and Right(Status,1)<>'0'and hy = '0019'.Net SqlClient Data Provider98308:31.9232480298SELECT TOP 5 L.title, L.siteUrl FROM Links L INNER JOIN LinksCategory CON C.PKID = L.CategoryID INNER JOIN LinksType T ON T.typeID = C.typeIDWHERE (T.typeID = 7).Net SqlClient DataProvider3057654:41.622720282

View 1 Replies View Related

Can I Create A Filegroup On Existnig Table

Feb 22, 2001

Can I create a filegroup on existnig table?If yes,How?
TIA

View 3 Replies View Related

Sql Compact For High Speed Lookups?

Jul 5, 2007

Is there any particular throughput/network/memory advantages to using Sql Compact files as lookup reference table sources, particular for static or largely static data, and if the SSIS package execution servers are running jobs remotely, aka, not "on the database server"?



I've been experimenting using Sql Compact as a OLEDB lookup source for reference data (business key => surrogate key), for example, using an OLEDB connection manager with the following connection string.

Data Source="C:\ISRoot\Cache\Cache.sdf";Provider=microsoft.sqlserver.mobile.oledb.3.0;











View 4 Replies View Related

Timeout Error With High Speed Connection

May 1, 2001

Hello ,everybody
Please help with our case

1. Client complain ...aplication to slow
They configuration
10 NT connected to 1 SQL server
network speed 10 10 mgb.sec

2. We change network speed to 100 mgb.sec
Our application produce timeout error
3. We connected computer to SQL server using cable
Our application produce timeout error

4. We run aplication on same station with SQL server
The is no error

Query giving error normally runs 1300 -1500 mms with Analyzer
What should we check beside our application


Thanks

View 4 Replies View Related

How Many Clustered Index Can I Create On A Table?

Nov 14, 2007

Hi all
as i remember i had read in Books Online that on each Table in Sql Server we can create only one Clustered index
but today suddenly i create another clustered index on a table without any Error from SQl server !!!
BUT my query Order changed to the order of this newly created index.
could anyone elaborate on this issue?

Thanks in advance.
Regards.

View 4 Replies View Related

Clustered Indexes - High Or Low Selectivity?

Apr 4, 2007

Hi,



I am studying for MCTS and through some of the course material it recommends that a low selectivity field i.e. First Name is a good canditate for a clustered index.



This goes against what is recommended online (completely the opposite) and goes against what I have been taught in the past.



What is correct for the exam?



Thanks

View 1 Replies View Related

SQL 2012 :: Create Clustered Index On A Very Large Table (500 GB)

May 7, 2014

I need to create a Clustered Index (CI) on a very large SQL Server 2012 database table. This table has about approximately 10 billion rows, 500 GB in size. The job ran for about 20 hours into it and then fails with error: "Out of disk space in tempdb". My tempDB size is 1.8TB, but yet it's still not enough.

Here is my script:

CREATE CLUSTERED INDEX CI_IndexName
ON TableName(Column1,Column2)
WITH (MAXDOP= 4, ONLINE=ON, SORT_IN_TEMPDB = ON, DATA_COMPRESSION=PAGE)
ON sh_WeekDT(Day_DT)
GO

View 9 Replies View Related

SQL Server 2014 :: Error - Cannot Create More Than One Clustered Index On Table

Aug 18, 2015

i have created a fact table which has unique cluster index as below,

CREATE UNIQUE CLUSTERED INDEX [FactSales_SalesID] ON [dbo].[FactSales] (salesid ASC)
WITH (DATA_COMPRESSION = PAGE)
GO
however later when i add CLUSTERED COLUMNSTORE INDEXES :
CREATE CLUSTERED COLUMNSTORE INDEX CSI_FactSales
ON dbo.FactSales WITH (DATA_COMPRESSION = COLUMNSTORE)
GO

it prompts error.

Msg 35372, Level 16, State 3, Line 167 You cannot create more than one clustered index on table 'dbo.FactSales'. Consider creating a new clustered index using 'with (drop_existing = on)' option.

View 4 Replies View Related

T-SQL (SS2K8) :: HOW To Create Filestream For Filegroup For A DB

Dec 5, 2014

i have a DB in SQL Server 2008. and i wants to store file in DB.how can i create filestream for filegroup for a DB in SQL Server 2008

View 1 Replies View Related

SQL Server 2012 :: Create Filestream For Filegroup For A DB?

Dec 5, 2014

i have a DB in SQL Server 2008. and i wants to store file in DB.

how can i create filestream for filegroup for a DB in SQL Server 2008.

View 1 Replies View Related

Should I Create A Non-primary Default Filegroup As A Best Practice?

Nov 7, 2007

This is for SQL2k5. The database may be small or big, I don't know (it's going out to multiple customers). I'm wondering if in general it's considered "better" to create a single non-primary default filegroup and put all the objects there, or just leave everything in primary? In one training years back I got the impression that recovering the primary filegroup was important for certain restore operations, so it was always wise to separate them like this.


Thanks for your input,
Mike
MCDBA

View 4 Replies View Related

Extent Fragmentation Still High After Index Drop/create

Jul 20, 2005

hello everyone,we dropped the clustered & nonclustered indeces on a table, thenrebuilt them. logical fragmentation is near zero, but extentfragmentation is about 40%. how can this be if the indeces are brandnew?

View 2 Replies View Related

T-SQL (SS2K8) :: Use Variable In ALTER / CREATE PARTITION SCHEME Command For Filegroup?

May 9, 2010

Is it possible to use a variable to specify the filegroup in the ALTER/CREATE PARTITION SCHEME command?

I want the partition scheme to use the default filegroup for ALTER and CREATE PARTITION SCHEME. At the time the script is created, I don't know the default filegroup in the database.

My code:

declare @fileGroupName VARCHAR(50) = (select top 1 name from
sys.filegroups where is_default = 1)
ALTER PARTITION SCHEME MyScheme NEXT USED @fileGroupName

Is failing:

Incorrect syntax near '@fileGroupName'.

Q: Is it possible to use a variable for the filegroup in the ALTER/CREATE commands? Is so, what is the correct syntax?

Q: If using a variable is not possible, is there another way to specify the default filegroup?

View 2 Replies View Related

Recovery :: Cannot Create Listener For High Availability Group Of AlwaysOn On Cluster Environment

May 27, 2015

I have getting issues when i am creating listener for always On . Error shown as below

Can not bring  the Windows server fail over cluster (WSFC) resources online. (Error Code 5942). The WSFC service may not be running or may not be accessible in its currents states, or the WSFC resources may not be in a state that could accept the request.

For information about this error code see "system error code" in windows development documentation 

The attempt to create network name and IP address for the listener is failed. The WSFC service may not be running or may not be accessible in its currents states or the value provide for the network name and IP address may be incorrect. Check the state of the WSFC cluster and validate network name and IP address with network administrator. (Microsoft SQL Server error 41066) ...

View 2 Replies View Related

Create Clustered Index On A View

Mar 16, 2001

I have a view named select id,name,state from customer where state ='va'
can I create clustered index on a view (name) if so please provide me with the sql statement.
Thanks
Al

View 2 Replies View Related

How Long To Create A Non-clustered Index?

Feb 2, 2005

I need to know how long it will take to create a non-clustered index given:I know how many columns the index will affect, the column width in bytes, how many rows, an average row size, the number of hard disks, their speed in RPM, and they are setup in RAID 5. Thanks

View 10 Replies View Related

HOW TO CREATE NON CLUSTERED INDEX On Computed Fied

Apr 8, 2008

hi all ,
I am using sql server 2005.
I want to create non clustered index speed up the query search.
but when i create index with this code
CREATE UNIQUE NONCLUSTERED INDEX TEST ON DOCTOR_MASTER( DR_CUST_DOCTORCODE)

i am getting error like
Column 'DR_CUST_DOCTORCODE' in table 'DOCTOR_MASTER' cannot be used in an index or statistics or as a partition key because it is non-deterministic.

This column is formulated column whose value is populated when record get inserted through function. It values is i format identity column value + category

Pleasse suggest.

View 2 Replies View Related

How To Create Non-unique Clustered Indexed View?

May 30, 2008

I'm not able to create indexed views,
which are clustered-indexed on only 1st field.

I can't even INCLUDED other fields.

I need the entire view to exist as a physical table. (for performance)

Please let me know the work around.


Thanks..

View 1 Replies View Related

Table Variable Versus #Temp Table

Jan 17, 2008

In a previous post "Could #TempTable within SP cause lock on tempdb?" http://forums.microsoft.com/msdn/showpost.aspx?postid=2691763&siteid=1

It was obvious that we have to limit the use of #Temp table to a minimum. Let assume that some of the temp tables are really difficult to replace and we have to live with them.

Would it be easier on tempdb if the #TempTable is replaced by a table variable? Or do they all end up in tempdb?

Thanks in advance for any help.

View 4 Replies View Related

¿What Improves SQL Server Performance? HD Speed, Processor Speed Or Ram?

Oct 18, 2007



Hi,

I have several data bases on a server (SQL Server 2000 only, no web server installed) and lately, as the company keeps gowing, my users complain saying the server gets slow, (this dbs are well designed and recieve optimizations and integrity checks, etc) because of this, Im thinking about getting a new server to repleace my old ProLiant ML 330 which was bought 4 years ago but Im concerned about what server arquitecture or characteristic can help me best to improve response performance, is it HD speed? Processor speed? or more Ram? I want to make a good decision, so I´d really appreciate your help...

Thanks, Luis Luevano

View 1 Replies View Related

SQL Server 2008 :: Logic To Rebuild Only Clustered Indexes / Skipping To Rebuild Non Clustered Indexes In Same Table

Jun 25, 2015

I have a requirement to only rebuild the Clustered Indexes in the table ignoring the non clustered indexes as those are taken care of by the Clustered indexes.

In order to do that, I have taken the records based on the fragmentation %.

But unable to come up with a logic to only consider rebuilding the clustered indexes in the table.

create table #fragmentation
(
FragIndexId BigInt Identity(1,1),
--IDENTITY(int, 1, 1) AS FragIndexId,
DBNAME nvarchar(4000),
TableName nvarchar(4000),

[Code] ....

View 5 Replies View Related

High Availability To High Protection Without Reconfiguring Mirroring

Apr 23, 2007

Hi,

Is there a way to configure mirroring to go from High Availability to High Protection without having to reconfigure Database Mirroring? Using the interface in Management Studio, I can change the configuration option to High Performance, but not High Protection despite both of them being Synchronous.

If not, what are the recommended steps to configure the mirror once it already has been configured? Is just like initially setting up the mirror or would there be any shortcuts I could take? If I stop the mirroring and remove the witness, will the High Protection option be available?

Thanks,
J.

View 3 Replies View Related

High Safety Changed To High Performance After Fail Over ?

Mar 6, 2008

Hi There

I realise this is a stupid quesiton but i cannot really find any confirmation of this in BOL.


If you are running High Safety with automatic failover, when failover occurs does this automatically change to High Performance mode. SInce for failover to occur something has happen with the primary , it will be impossible to commit transactions on the new primary and mirror asyncronously since 1 of them is no longer available.


So am i correct in assuming that automatic failover also automatically changes the mode to High Performacne for that session?

Thanx

View 4 Replies View Related

Link Table Versus XML Column For One-to-many Relationship

Jun 10, 2007

I am designing a database schema where several tables have one-to-many relationships to records in other tables. One way to implement it is to create a link table for each pair of tables that have a relationship:





identity
Table1_ID
Table2_ID

1
12
9

2
12
15

3
18
42With the SQL 2005 support for the XML data type, there is the possibility of storing the IDs in an XML column. The XML stored with a record (equivalent to record 12 from the above example) might look like this:

<Links>
<Table2_LinkType>
<ID>9</ID>

<ID>15</ID>
</Table2_LinkType>
<Table8_LinkType>

. . .

</Table8_LinkType>
</Links>The XML column method has the advantage of not requiring that a separate table be created but does not enforce referential integrity. The link table method has the advantage of allowing constraints to enforce referential integrity but has the disadvantage of requiring the creation of a separate table for each pair of tables having a relationship and joining to an additional table has performance implications. Implementing standard Add, List and Delete operations for the link table method is straightforward. As a test and to familiarize myself with the new XML features, I created Set, List and Delete stored procedures for the XML method. Both methods will work.



In deciding which method to go with are there any other issues I should be considering besides database integrity, complexity and possible performance issues?
From the standpoint of best practices and coding standards is one method preferred over the other?
Here is some additional information. The data set I will be working with has table sizes numbering in the hundreds of thousands. Any given record will only be linked to at most a half-dozen records in any other table.

I searched on-line for information and I was able to find plenty of good articles discussing how to use the new XML data type in SQL. However, I was not able to find any information on when not to use the XML data type over equivalent joined-table methods.

View 1 Replies View Related

Setup And Upgrade :: Cannot Create Database Object Alert On Clustered Instance

Aug 25, 2015

We have installed 2014 sql server on a stand alone VM and can create alerts without issue.  We recently did a cluster install of 2014, and when trying to create alerts get the following error:

Msg 14262, Level 16, State 1, Procedure sp_verify_performance_condition, Line 52
The specified object_name ('Databases') does not exist.

Specifically, we are trying to create a database alert on percent log used that will kick off a job to back up the log.

We are on Windows 2012R2 o/s.  In the drop downs in SSMS under alerts, we do not have all the options we have in the stand alone instance - they are not there.  Is this a bug?  Is there a CU?

View 2 Replies View Related

How Do I Set Access 2002 Upsizing Wizard To Create Clustered-index On SQL 2005

Jun 3, 2006

Here is an extract from the Acc2Sql2.doc >>


By default, the Upsizing Wizard
transfers all indexes as nonclustered indexes. You can modify the Upsizing
Wizard to transfer the primary key index to a clustered index. To make this
change, start Microsoft Access and open the upsizing wizard library database.
For Microsoft Access 95, the filename is Wzcs.mda. For Microsoft Access 97, the
filename is Wzcs97.mda. When the database is open, click the Modules tab and open the
UT_ModUserConstants module. Search down to the UT_CLUSTERED constant. Change
the default value from False to True.

<<< end quote
Question: I am using ACCESS 2002 upsize wizard, I searched my computer for *.mda and could not find any wzcs*.mda. How do I set it so that it creates clustered-index instead of non-clustered-index?

View 1 Replies View Related

Move Table To Different Filegroup

Oct 28, 2005

I will be moving production SQL databases (one is 25Gb, the other is 3Gb) to a new server. One of the reasons is the old server has only IDE disks while the new has raid (I don't know the configuration yet).
Database 1 has a primary and one other filegroup. I want to spread the disk I/O by moving table A to it's own filegroup on it's own disk.
For the purposes of testing I have
1. brought a database onto a test server (using sp_detach_db, copying the files and attaching using sp_attach_db)
2. created a new filegroup
3. created a physical file on disk, allocated space and associated with my new filegroup

my question is how do I now move table A into this file?

View 1 Replies View Related

Moving ONE Table To A Different Filegroup Using T-SQL

Aug 29, 2002

I need to know if it is possible to move ONE table from an existing filegroup to another existing filegroup.
The answer I received to use ALTER database only modifies the file/filegroup name or changes the default filegroup.
Any assistance will be greatly appreciated.

View 1 Replies View Related

Move Table To Other Filegroup?

Jul 8, 2004

Hi every body,

Is there anyone know the way to move a table with data to other file group?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved