Showing posts with label guid. Show all posts
Showing posts with label guid. Show all posts

Wednesday, March 28, 2012

RowGuid

Hi

What impact is there in setting a unqiueidentifier primary key to be a row guid?

How does this impact performance?

How does this impact data file size?

Does it impact anything else?

Thanks

Hi,

I guess you don′t want to open up taht religious discussion, right ? There were many, many, many discussions already about this out there which can be find googling / MSNning around:

http://www.google.de/search?hl=de&q=GUID+Primary+Key&meta=

There are really many opinions out there, for me (for my personal opinion) you should avoid them, as long as you don′t really need them, like for distributed applications)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Hi Jens

Thanks for the response but I wasn't asking if I should use a UNIQUEIDENTIFIER as a primary key.

I was just wondering what the impact was in setting the rowguid flag.

For example...

CREATE TABLE Schema.Table (Id UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL CONSTRAINT PTableId PRIMARY KEY NONCLUSTERED WITH FILLFACTOR=60)

CREATE TABLE Schema.Table (Id UNIQUEIDENTIFIER NOT NULL CONSTRAINT PTableId PRIMARY KEY NONCLUSTERED WITH FILLFACTOR=60)

sql

Monday, March 12, 2012

ROW ID

Can any one guid me like I have a billions of records and I want to see only
10th record and I want to fetch the 10th record through rowid not the Unique
primary key.
Let's say Table primary key id start from
6380,
7066,
7067,
7131,
7896,
8042
and so on ...
If I wanna fetch third record which ID = 7067 so I have to give 7067 but I
want to give input parameter = 3 then it will show me the third record, I am
talking about row id... is there any thing in SQL Server or any alternate
way through which I can solve my problem.
Thanks
Hi,
There is no row id concept in SQL Server.
Thanks
Hari
SQL Server Mvp
"Roy" <roy@.hotmail.com> wrote in message
news:OKMKgoqdFHA.1384@.TK2MSFTNGP09.phx.gbl...
> Can any one guid me like I have a billions of records and I want to see
> only
> 10th record and I want to fetch the 10th record through rowid not the
> Unique
> primary key.
> Let's say Table primary key id start from
> 6380,
> 7066,
> 7067,
> 7131,
> 7896,
> 8042
> and so on ...
> If I wanna fetch third record which ID = 7067 so I have to give 7067 but I
> want to give input parameter = 3 then it will show me the third record, I
> am
> talking about row id... is there any thing in SQL Server or any alternate
> way through which I can solve my problem.
> Thanks
>
>
|||Just to add there will be one in SQL2005
Andrew J. Kelly SQL MVP
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:efaBvgudFHA.640@.tk2msftngp13.phx.gbl...
> Hi,
> There is no row id concept in SQL Server.
> Thanks
> Hari
> SQL Server Mvp
> "Roy" <roy@.hotmail.com> wrote in message
> news:OKMKgoqdFHA.1384@.TK2MSFTNGP09.phx.gbl...
>

Row Guid

I thought I read that 2000 transactional replication used a ROW Guid on the
subscriber. But I just looked at the test instance I set up and I see no
such thing. If Sql Server does not use a RowGuid, how does it keep track of
everything? just by the primary key?
Trans replication doesn't use rowguid. Only Merge uses it. Trans, (immediate
and queued) use ms_repl_tran_version) to keeep track. If it's only a one way
transactional, it doesn't use anything because it doesn't need to.
|||It uses the rowguid key if you are using immediate updating, immediate
updating with queued failover, or queued.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"CLM" <CLM@.discussions.microsoft.com> wrote in message
news:5C0574FB-C9CA-4990-98FD-232FB196D33E@.microsoft.com...
>I thought I read that 2000 transactional replication used a ROW Guid on the
> subscriber. But I just looked at the test instance I set up and I see no
> such thing. If Sql Server does not use a RowGuid, how does it keep track
> of
> everything? just by the primary key?