Re: Objects and Relations
Date: 31 Jan 2007 23:43:13 -0800
On Jan 31, 1:49 pm, "Kevin Kirkpatrick" <kvnkrkpt..._at_gmail.com> wrote:
> In almost any modern SQL DBMS, if string is stored as a relation
> mapping indexes to characters, and indexOf() is written as Mashall
> defined it, one could slap an index on the string relation and
> immediately have a O(log n) for indexOf(). In fact, for rare
> characters such as delimiters (which are most likely to be searched
> for within an application making routine use of indexOf), they would
> have an implementation approaching O(1). Even better, modern databases
> allow for the kind of dynamic sampling which would allow an optimizer
> to make runtime decisions that choose whether to use a binary search
> for rare characters, or an array scan starting at fromIndex for more
> common characters.
And particularly note how much the statistical methods of a modern DBMS appear to be identical at least in spirit to the statistical methods used in a modern VM, such as HotSpot. I cannot help but feel that this is just one more place where people are discovering the exact same things on either side of the code/data divide, and how much better life will be once someone unifies the two.
Marshall Received on Thu Feb 01 2007 - 08:43:13 CET