 |
|
 |
|
Next: liuxin
|
| Author |
Message |
External

Since: Jan 11, 2008 Posts: 440
|
(Msg. 16) Posted: Fri Dec 26, 2008 5:25 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: microsoft>public>sqlserver>programming (more info?)
|
|
|
On Fri, 26 Dec 2008 12:12:38 -0800 (PST), --CELKO-- wrote:
>Since I teach SQL, I need to know the various mindsets so I can "un-
>learn" my students.
If you teach SQL, then you should concentrate on LEARNING your students.
The human brain is perfectly capable of retaining lots of information,
there is no need to remove stuff first before you can put in something
new.
I am very glad that nobody has ever tried to "unlearn" me anything; I
can still fall back on all the methods and tricks I learned in the
decades past (though admittedly, some have become a bit rusty after
years of non-use).
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Jan 11, 2008 Posts: 579
|
(Msg. 17) Posted: Fri Dec 26, 2008 7:39 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Play with percentage of free space - and blow out the number of IOs required
to return the same data. IO is NOT fast ... even today.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"--CELKO--" wrote in message
>> Sure if you have heavy inserts then you would have less contention. But
>> at the cost of a much higher percentage of page splits (of the "bad"
>> kind, where half the page needs to be moved to make room for the new
>> row). <<
Then play with the percentage of free space per data page, like we did
in the old days. . This is one reason I like perfect hashing more
and more as I get older. The CPU is fast and when the math is done, I
get to data in one probe. SQLO and perhaps IT in general gets bzack
to "it all depends..." so fast  >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
|
Aaron Bertrand [SQL Serve
|
External

Since: Jan 10, 2008 Posts: 2166
|
(Msg. 18) Posted: Fri Dec 26, 2008 8:20 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Jan 10, 2008 Posts: 640
|
(Msg. 19) Posted: Sun Dec 28, 2008 9:59 am
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 28, 11:15 am, "m" wrote:
> This is not an issue exclusive to western culture; nor is it limited by
> alphabetic congruity. This is, as Celko says, an issue of familiarity.
> Relational database are _hard_ to understand because they are, in many ways,
> counterintuitive. This is not a case of a new generation rejecting
> something contrived in the dotage of their predecessors, but of a specific
> and exotic species of knowledge providing a tangible benefit to the elegance
> and performance of data storage and retrieval systems.
>
> I will not go so far as to arrogate myself in the claim that I can relate
> the sum of another's experience from their choice of variable names or the
> paradigm of a singularity of their construction
>
> Remembering that data storage is arbitrarily ordered is a VITAL part of
> working on ANY database.
No. In 21st century there is growing discontent with this approach.
Vertica broke away from the unsorted data paradigm, and it (Vertica)
is lightning fast for some problems. >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Dec 21, 2008 Posts: 4
|
(Msg. 20) Posted: Sun Dec 28, 2008 12:15 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
This is not an issue exclusive to western culture; nor is it limited by
alphabetic congruity. This is, as Celko says, an issue of familiarity.
Relational database are _hard_ to understand because they are, in many ways,
counterintuitive. This is not a case of a new generation rejecting
something contrived in the dotage of their predecessors, but of a specific
and exotic species of knowledge providing a tangible benefit to the elegance
and performance of data storage and retrieval systems.
I will not go so far as to arrogate myself in the claim that I can relate
the sum of another's experience from their choice of variable names or the
paradigm of a singularity of their construction
Remembering that data storage is arbitrarily ordered is a VITAL part of
working on ANY database. The solution may be as simple as to always include
an order by clause in queries - and there is nothing wrong with that
approach! A better one is to make the behaviour of the consuming
application invariant with the order of the result set(s); and many times
this just means sorting for display on the desktop.
"Alex Kuznetsov" wrote in message
On Dec 26, 3:47 pm, --CELKO-- wrote:
> >> I would say that for many (maybe most) practical purposes the concept
> >> of unordered, or arbitrarily ordered, sets is an unnecessary
> >> complication. This is why most bright people unfamiliar with RDBMS
> >> intuitively do not want it - they apply Occum's razor to RDBMS theory.
> >> <<
>
> But this is not a complication; it is a simplifcation -- a constraint
> is removed. Ordering can be very elaborate -- get a librarian's guide
> book for sorting book titles. This is the problem of the Familar, not
> complications. Simplifcation also destroys the Familiar.
>
> In Western culture, thanks to the alphabet, we expect an ordering.
> Chinese do not expect this. An old friend of mine taught in Red China
> many years ago. She got her class roster in Latin letters, but
> unsorted; you simply learn the names of 150 students from a list.
>
Whatever you call it - for us Westerners it requires an effort to keep
in mind that sets are not sorted. For most practical problems this
effort yields us absolutely no practical gains.
> >> This includes bright young people who have never seen a computer
> >> magnetic tape. They don't mimic magnetic tapes - they just use their
> >> brains and common sense and reject previous generations' prejudices.
> >> This is progress for you... <<
>
> They are using magnetic tapes as their mindset, but they do not know
> it. Magnetic tapes exist because of punch cards; punch cards are
> sorted because of alphabetic order (and place-valued numbering that
> allows alphabetic sorting).
>
> They are using the previous generations' prejudices because they live
> in an alphabetic cultuire. An example : nested sets versus adjacency
> list model for trees. Older programmers like adjacency list models
> because they look like pointer chains. Younger programmers like
> nested sets because they look like HTML tags.
I think you are contradicting yourself. Don't you see yourself: it is
alphabetic order not magnetic tape we are intuitively expecting. Don't
get me wrong - I think we need to change mindsets whenever it is
necessary. But the mindset change must be justified by some practical
gain, and in most cases I just don't see any need, most database
problems can be solved just fine without the concept of unordered
sets. >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Jan 11, 2008 Posts: 1089
|
(Msg. 21) Posted: Sun Dec 28, 2008 3:50 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
>> No. In 21st century there is growing discontent with this approach. Vertica broke away from the unsorted data paradigm, and it (Vertica) is lightning fast for some problems. <<
Before Vertica, we had SAND, Sybase's IQ, Model 204 and a few other
columnar DBs. What columnar DBs broke away from was contiguous
physical records. These are usually great for Data Warehouse apps
where you need aggregate data but not so good for OLTP. >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Jan 10, 2008 Posts: 640
|
(Msg. 22) Posted: Mon Dec 29, 2008 12:00 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 28, 5:50 pm, --CELKO-- wrote:
> >> No. In 21st century there is growing discontent with this approach. Vertica broke away from the unsorted data paradigm, and it (Vertica) is lightning fast for some problems. <<
>
> Before Vertica, we had SAND, Sybase's IQ, Model 204 and a few other
> columnar DBs. What columnar DBs broke away from was contiguous
> physical records. These are usually great for Data Warehouse apps
> where you need aggregate data but not so good for OLTP.
Yep, if you assume that data is unsorted, you can build RDBMS based on
that assumption, and it will be great for some purposes. Similarly, if
you assume that data is _sorted_, you can also build another kind of
DBMS based on that assumption, and it will also be great for some
purposes too...
The rules DBMS are built on are not laws of Nature - they can be
changed and you can still have a useful system. >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Jan 10, 2008 Posts: 640
|
(Msg. 23) Posted: Mon Dec 29, 2008 8:40 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Dec 21, 2008 Posts: 4
|
(Msg. 24) Posted: Mon Dec 29, 2008 9:02 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
This product, Vertica, is purpose built for time-series data and, like most
problems, the more accurately you can define it, the more efficiently you
can solve it.
I also question the benchmarks on their website. I have serious doubts
about the efficiency of the systems they were replacing
This system aside, systems that store data serially are not new and are well
understood to be a subset of DBMSes. If you assume that your app will
ALWAYS be using a serial data store, then you can optimize it in certain
ways. If not, then your app will still work, but it _may_ do some extra
work to make sure that it will always work.
"Alex Kuznetsov" wrote in message
On Dec 28, 11:15 am, "m" wrote:
> This is not an issue exclusive to western culture; nor is it limited by
> alphabetic congruity. This is, as Celko says, an issue of familiarity.
> Relational database are _hard_ to understand because they are, in many
> ways,
> counterintuitive. This is not a case of a new generation rejecting
> something contrived in the dotage of their predecessors, but of a specific
> and exotic species of knowledge providing a tangible benefit to the
> elegance
> and performance of data storage and retrieval systems.
>
> I will not go so far as to arrogate myself in the claim that I can relate
> the sum of another's experience from their choice of variable names or the
> paradigm of a singularity of their construction
>
> Remembering that data storage is arbitrarily ordered is a VITAL part of
> working on ANY database.
No. In 21st century there is growing discontent with this approach.
Vertica broke away from the unsorted data paradigm, and it (Vertica)
is lightning fast for some problems. >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Jan 17, 2008 Posts: 16
|
(Msg. 25) Posted: Tue Dec 30, 2008 5:50 am
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I think it's important to differentiate between theory and practical
solutions. For instance, how many theoretical and defined forms of
normalization are there and how many practical systems follow every one of
those constraints and rules?
The concept of a logical table is essentially an unordered set of rows and
columns. However, in a usable RDBMS based solution, you are going to rely on
ordered data storage in order to speed up data access. Consider any index
you will build within the major RDBMSes. Ordered data storage.
Whether you use an identity field as a surrogate key or a natural key,
you're going to index it, and whether Joe Celko realizes it or not, if you
index your primary key, then you're physically ordering your data (even if
it's just the keys in the index, since in this case, the keys in the index
would equal your primary key).
I tend to choose to use surrogate keys because I know that this value will
never have to change (plus it tends to result in a smaller key). It's a very
rare occasion when the natural key is a uniquely and non-changing data value.
Unfortunately for theorists like Celko (and make no mistake, I believe Joe
has one of the strongest understandings of RDBMS theory), the world that you
try to model in database systems does NOT bend itself to the rules of RDBMS
design, it defines itself by the actual reality of the thing being modeled.
Because of this, the system being modeled should drive the design of the
database, not the other way around.
Just a quick reality check.
Matt
"Alex Kuznetsov" wrote:
> On Dec 29, 8:02 pm, "m" wrote:
> > This product, Vertica, is purpose built for time-series data and, like most
> > problems, the more accurately you can define it, the more efficiently you
> > can solve it.
>
> Yes, and there are other cases when RDBMS do not shine, and other
> approaches work better...
> >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Feb 22, 2008 Posts: 29
|
(Msg. 26) Posted: Mon Jan 12, 2009 10:25 am
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Thu, 25 Dec 2008 13:01:31 -0800 (PST), --CELKO--
wrote:
>>> I never understand why humans feel the need to start with 1 for identities - it loses them 50% of the possible values. Guess it is just one of those things. <<
>
>The mindset is simple to underestand. When you mimic a magnetic tape,
>PHYSICAL records are nuimbered from 1 to n; there are no PHYSICAL
>records in negative PHYSICAL positions. Once you learn RDBMS, you
>stop using IDENTITY and start using keys instead.
Still waiting for the patently obvious natural key for a human
being.....
Or a customer, where that customer may or may not be a registered
company....
Or anything else, for that matter.
Iain >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Jan 11, 2008 Posts: 1089
|
(Msg. 27) Posted: Wed Jan 14, 2009 1:05 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
|
Aaron Bertrand [SQL Serve
|
External

Since: Jan 10, 2008 Posts: 2166
|
(Msg. 28) Posted: Wed Jan 14, 2009 6:05 pm
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Why can't you answer the question Joe, instead of pointing to an article
that requires registration? What do you think Amazon uses to identify a
customer? DNA? Highly unlikely. Anything less is unverifiable according
to your strict standards. So, show me the DDL for their Customers table,
please?
>>> Still waiting for the patently obvious natural key for a human being....Or
>>> a customer, where that customer may or may not be a registered company....
>>> <<
>
> Have you looked at identity resolution software? It has become a
> whole subtopic in the Data Quality world. Here is a start:
>
> http://www.dmreview.com/white_papers/10002001-1.html?ET=dmreview:e757:2057139a
> :&st=email
>
> Informatica and other companies concerned with loading Data Warehouses
> have some smart software to resolve identity problems. >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
External

Since: Jan 11, 2008 Posts: 1089
|
(Msg. 29) Posted: Thu Jan 15, 2009 10:08 am
Post subject: Re: Recycle Identity field value when it reaches its max [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
>> Why can't you answer the question Joe, instead of pointing to an article that requires registration? <<
Because you cannot post an entire discipline on a newsgroup. Identity
resolution has become a very broad topic in the Data Quality world. I
just wanted to get him started with information that does not require
paying money. Do you think I should have bought him a member is
DAMA?
>> What do you think Amazon uses to identify a customer? DNA? Highly unlikely. Anything less is unverifiable according to your strict standards. So, show me the DDL for their Customers table, please? <<
Amazon uses email addresses (an option that Iain rejected) and credit
card/PayPal accounts. Why don't they use an IDENTITY? Well, they are
not an MS shop running on one server. But internally generated
customer numbers cannot be verified internally. Customers will not
learn them by heart. But an email address is easy to validate (look
up a few regular expressions for them) and you ping it to verify it.
I can also use it to look at other websites if I want to get more
details on the customer (Joe Celko speaks Esperanto and plays Go
according to his browsing habits; better put those topic in his
favorites lists and send him some spam).
I am the guy who talks and writes thousands of words about "degree of
risk" in data. The courts want my DNA when I am on trial; a foreign
government wants to see my Passport; the grocery store wants my
Drivers License when I cash a check; my ATM wants my card and a PIN.
Each has a different degree of risk. Etc. Etc. If you don't have my
books, you should have read my postings.
What I do see is that DNA will become the identifier of choice when
the technology is there in just a few years. Instead of a PIN, I will
put my finger in an ATM (or whatever replaces them). A Japanese
company is marketing a cheap fingerprint machine for police -- Austin
wants to buy ~100 of them and we are a small city. There are also DNA
machines that can go into the field that are currently sold to police
agencies. It is just a matter of time.
I don't want to deal with the privacy issues here ... >> Stay informed about: Recycle Identity field value when it reaches its max |
|
| Back to top |
|
 |  |
| Related Topics: | Determine whether a field in recordset is a Identity Field - Hi, I'm using VB6 and I want to know which Column in the recordset is the Identity Column (if any). I've a SQL Server 2000 table. It has 5 colums, the first one is the Identity Column. Now I want to recognize this column in VB6 using ADO 2.8. I used....
Next Id without Identity - I'm getting a duplicate key problem with this code. I can't use a Identity column. BEGIN TRANSACTION INSERT INTO T1 (Id1, Id2, OrderNo, Data) SELECT @Id1_p, @Id2_p, ISNULL(max(OrderNo),0) + 1, @Data FROM T1 WHERE Id1 = @Id1_p AND Id2 ...
Identity Column - Is it possible to set the indentitiy flag for a column by simply using alter table/alter column in SQL 2000 and SQL 2005.
INSERT identity - If I issue a command to insert a record with ALLOW IDENTITY INSERT will I have to reset the current IDENTITY column? Thanks. David
How to find next identity - Hi All, Is there any way to know the next identity number the server would probably assign for the identity column? I'm having a table say Student with an identity column as StudentId. How to find the next Id value the system would assign for a new.. |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|