Showing posts with label index. Show all posts
Showing posts with label index. Show all posts

Monday, March 19, 2012

differnce between a column that s a primary key and a column that s a "key/index with Isuni

Hi,

Please, What s the differnce between a column that s a primary key and a column that s a "key/index with Isunique=true"?

Thanks a lot.

EDIT

A Primary cannot be Null but Unique key can be Null. Check the links below for the documentation.

http://msdn2.microsoft.com/en-us/library/ms181043.aspx

http://msdn2.microsoft.com/en-us/library/ms191166.aspx

|||

Another difference is that if you use a UNIQUE constraint as a target for a foreign key reference you must explicitly reference the columns.

For instance, if you have a table "TableA" that has a primary key "TableA_PKCol", you can target that as a foreign key from table "TableB" with something like:

Code Snippet

Alter table TableB

add constraint FK_TableB__TableA

foreign key (TabkeA_PKCol)

references TableA

However, if you have a table "TableJ" that has a unique key "TableJ_UQCol", you must explicitly name that column to target this column as a foreign key target from "TableK" with something like:

Code Snippet

Alter table TableK

add constraint FK_TableK__TableJ

foreign key (TableJ_UQCol)

references TableJ (TableJ_UQCol)

Friday, February 24, 2012

Different FillFactors for different partitions?

Why is fillfactor not a recognized option on alter index rebuild
partition. I'm partitioning my data by month, I'd like to set the
fillfactor to 100 for old partitions, but put a lower fill factor say
60% for this month so that I don't have to worry about page splits for
incoming data. I'm in a realtime etl environment, so a sliding window
is not going to do it. Please advise.
ALTER INDEX IX_MyIndexKey ON dbo.tblMyTable REBUILD PARTITION=91
WITH (FILLFACTOR = 60,
PAD_INDEX = ON,
ONLINE = ON);
GO
Msg 155, Level 15, State 1, Line 2
'fillfactor' is not a recognized ALTER INDEX REBUILD PARTITION optionIt's a known issue:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=242025
Please cast your vote so that it will move up on their priority list.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"dba" <bryanmurtha@.gmail.com> wrote in message
news:1186660216.374134.172540@.g4g2000hsf.googlegroups.com...
Why is fillfactor not a recognized option on alter index rebuild
partition. I'm partitioning my data by month, I'd like to set the
fillfactor to 100 for old partitions, but put a lower fill factor say
60% for this month so that I don't have to worry about page splits for
incoming data. I'm in a realtime etl environment, so a sliding window
is not going to do it. Please advise.
ALTER INDEX IX_MyIndexKey ON dbo.tblMyTable REBUILD PARTITION=91
WITH (FILLFACTOR = 60,
PAD_INDEX = ON,
ONLINE = ON);
GO
Msg 155, Level 15, State 1, Line 2
'fillfactor' is not a recognized ALTER INDEX REBUILD PARTITION option

Different FillFactors for different partitions?

Why is fillfactor not a recognized option on alter index rebuild
partition. I'm partitioning my data by month, I'd like to set the
fillfactor to 100 for old partitions, but put a lower fill factor say
60% for this month so that I don't have to worry about page splits for
incoming data. I'm in a realtime etl environment, so a sliding window
is not going to do it. Please advise.
ALTER INDEX IX_MyIndexKey ON dbo.tblMyTable REBUILD PARTITION=91
WITH (FILLFACTOR = 60,
PAD_INDEX = ON,
ONLINE = ON);
GO
Msg 155, Level 15, State 1, Line 2
'fillfactor' is not a recognized ALTER INDEX REBUILD PARTITION optionIt's a known issue:
https://connect.microsoft.com/SQLSe...=2420
25
Please cast your vote so that it will move up on their priority list.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"dba" <bryanmurtha@.gmail.com> wrote in message
news:1186660216.374134.172540@.g4g2000hsf.googlegroups.com...
Why is fillfactor not a recognized option on alter index rebuild
partition. I'm partitioning my data by month, I'd like to set the
fillfactor to 100 for old partitions, but put a lower fill factor say
60% for this month so that I don't have to worry about page splits for
incoming data. I'm in a realtime etl environment, so a sliding window
is not going to do it. Please advise.
ALTER INDEX IX_MyIndexKey ON dbo.tblMyTable REBUILD PARTITION=91
WITH (FILLFACTOR = 60,
PAD_INDEX = ON,
ONLINE = ON);
GO
Msg 155, Level 15, State 1, Line 2
'fillfactor' is not a recognized ALTER INDEX REBUILD PARTITION option

Different FillFactors for different partitions?

Why is fillfactor not a recognized option on alter index rebuild
partition. I'm partitioning my data by month, I'd like to set the
fillfactor to 100 for old partitions, but put a lower fill factor say
60% for this month so that I don't have to worry about page splits for
incoming data. I'm in a realtime etl environment, so a sliding window
is not going to do it. Please advise.
ALTER INDEX IX_MyIndexKey ON dbo.tblMyTable REBUILD PARTITION=91
WITH (FILLFACTOR = 60,
PAD_INDEX = ON,
ONLINE = ON);
GO
Msg 155, Level 15, State 1, Line 2
'fillfactor' is not a recognized ALTER INDEX REBUILD PARTITION option
It's a known issue:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=242025
Please cast your vote so that it will move up on their priority list.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"dba" <bryanmurtha@.gmail.com> wrote in message
news:1186660216.374134.172540@.g4g2000hsf.googlegro ups.com...
Why is fillfactor not a recognized option on alter index rebuild
partition. I'm partitioning my data by month, I'd like to set the
fillfactor to 100 for old partitions, but put a lower fill factor say
60% for this month so that I don't have to worry about page splits for
incoming data. I'm in a realtime etl environment, so a sliding window
is not going to do it. Please advise.
ALTER INDEX IX_MyIndexKey ON dbo.tblMyTable REBUILD PARTITION=91
WITH (FILLFACTOR = 60,
PAD_INDEX = ON,
ONLINE = ON);
GO
Msg 155, Level 15, State 1, Line 2
'fillfactor' is not a recognized ALTER INDEX REBUILD PARTITION option

Tuesday, February 14, 2012

Differences between SQL FTS and Index Server FTS

What are the main differences between SQL FTS and Index Server FTS?
Thank you.
Best regards,
Emil Mustea
Emil,
Short answer: Not much as both as based upon the same internal MS Search
technologies used also in Exchange 2000/2003.
Longer Answer: While both a based upon the same code base, they differ in
what is indexed and how as the Indexing Service indexes files and depends
upon the NTFS change log and SQL Server FTS and the MSSearch service indexes
textual data in SQL Server tables.
Are there specific differences you're interested in? If so, could you post
more specific questions?
Thanks,
John
"Emil Mustea" <emil@.sonic.ro> wrote in message
news:Oh$CQ7fNEHA.3944@.tk2msftngp13.phx.gbl...
> What are the main differences between SQL FTS and Index Server FTS?
> Thank you.
> Best regards,
> Emil Mustea
>
|||SQL FTS only allows you to index and search textual data in tables in your database.
Indexing Services, Exchange Content Indexing, and Sharepoint portal server search allow you to index documents and their properties.
Indexing Services can natively index IMAP servers, file systems, web sites, ftp servers, nntp servers.
Exchange Content Indexing can index mailboxes, and public folders.
Sharepoint Portal server can index IMAP servers, file systems, web sites, ftp servers, nntp servers, and can be extended to index other document repositories like the Sharepoint WSS, Lotus Notes, etc.
|||Ok..I know that SQL FTS indexes SQL tables (and eventually files in SQL
2000), and Index Server indexes files.
What I wanted to ask is what are the main differences between quering SQL
FTS and Index Server(accent sensitivity, types of queries supported, ...etc)
Thank you.
Best regards,
Emil Mustea
"John Kane" <jt-kane@.comcast.net> wrote in message
news:etv9EvgNEHA.892@.TK2MSFTNGP09.phx.gbl...
> Emil,
> Short answer: Not much as both as based upon the same internal MS Search
> technologies used also in Exchange 2000/2003.
> Longer Answer: While both a based upon the same code base, they differ in
> what is indexed and how as the Indexing Service indexes files and depends
> upon the NTFS change log and SQL Server FTS and the MSSearch service
indexes
> textual data in SQL Server tables.
> Are there specific differences you're interested in? If so, could you post
> more specific questions?
> Thanks,
> John
>
> "Emil Mustea" <emil@.sonic.ro> wrote in message
> news:Oh$CQ7fNEHA.3944@.tk2msftngp13.phx.gbl...
>