-
as seen on Stack Overflow
- Search for 'Stack Overflow'
We have a database in which all the PKs are GUIDs, and most of the PKs are also the clustered index for the table. We know that this is bad (due to the random nature of GUIDs). So, it seems there are basically two options here (short of throwing out GUIDs as PKs altogether, which we cannot do (at…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello colleagues.
I've got a question. I use NHibernate with MySql. At my entities I use Id(PK) for my business-logic usage and Guid(for replication). So my BaseDomain:
public class BaseDomain
{
public virtual int Id { get; set; }
public virtual Guid Guid { get; set; }
public class…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I want to have efficient query to get some rows from my table.
Here is I think the best presentation of my table.
-Somedate is not duplicated - it is date of modifiedon
-a,b,c are parent ids, let say countryCode
-1,2,3,4 are subparent, let say citycode
-guids are id of rows
-true, false are values…
>>> More
-
as seen on SQL Blogcasts
- Search for 'SQL Blogcasts'
Our partner was explaining to me that they are using GUID as primary key on all the tables. My immediate reaction was - why? and couple of basic doubts were: - since I can read uniqueidentifier, it does not tell me absolutely anything - if I will use my relational table, i sure will use other columns…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to convert a string to GUID with sscanf:
GUID guid;
sscanf( "11111111-2222-3333-4455-667788995511", "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
&guid.Data1, &guid.Data2, &guid.Data3,
&guid.Data4[0], &guid.Data4[1], &guid.Data4[2],
…
>>> More