Re: Oracle vs. DB2 UDB
- From: "Niall Litchfield" <niall.litchfield@xxxxxxxxx>
- To: Brandon.Allen@xxxxxxxxxxx
- Date: Mon, 17 Jul 2006 06:07:23 +0100
On 7/14/06, Allen, Brandon <Brandon.Allen@xxxxxxxxxxx> wrote:
I don't know anything about DB2, but you can only co-locate to satisfy
one sort criteria/index. You can do this manually in Oracle by reorganizing
a table and ordering it to match a given index (and thereby greatly increase
the clustering factor for *that* index, but possibly blowing it for the
others), or you can use Oracle's IOTs (index organized tables) if
appropriate - that's what SQL server does if I understand correctly. Been a
while since I worked on SQL server, but IIRC, the default for every table is
for it to be index organized according to it's primary key, rather than just
a heap like the default in Oracle.
actually the default bahaviour of sql server is heap tables just as in
Oracle. The 'conventional wisdom' however (and so the default behaviour of
sql server developers) is that every table should have a clustered index
(the feature you are describing) and that that should be the primary key
where there is one. Personally I didn't go much for that 'wisdom' myself. As
an aside my observation was that there was one very good side effect and
that was that people from a sqlserver development background actually tended
to create primary keys and foreign keys more often than people from and
Oracle background. Not necessarily the right ones (and nearly always
artificial ones) but none the less relational databases with relationships
in them. :(
--
Niall Litchfield
Oracle DBA
http://www.orawin.info
- References:
- RE: Oracle vs. DB2 UDB
- From: Allen, Brandon
Other related posts:
- » Oracle vs. DB2 UDB
- » Re: Oracle vs. DB2 UDB
- » Re: Oracle vs. DB2 UDB
- » RE: Oracle vs. DB2 UDB
- » RE: Oracle vs. DB2 UDB
- » RE: Oracle vs. DB2 UDB
- » Re: Oracle vs. DB2 UDB
- » Re: Oracle vs. DB2 UDB
I don't know anything about DB2, but you can only co-locate to satisfy one sort criteria/index. You can do this manually in Oracle by reorganizing a table and ordering it to match a given index (and thereby greatly increase the clustering factor for *that* index, but possibly blowing it for the others), or you can use Oracle's IOTs (index organized tables) if appropriate - that's what SQL server does if I understand correctly. Been a while since I worked on SQL server, but IIRC, the default for every table is for it to be index organized according to it's primary key, rather than just a heap like the default in Oracle.
actually the default bahaviour of sql server is heap tables just as in Oracle. The 'conventional wisdom' however (and so the default behaviour of sql server developers) is that every table should have a clustered index (the feature you are describing) and that that should be the primary key where there is one. Personally I didn't go much for that 'wisdom' myself. As an aside my observation was that there was one very good side effect and that was that people from a sqlserver development background actually tended to create primary keys and foreign keys more often than people from and Oracle background. Not necessarily the right ones (and nearly always artificial ones) but none the less relational databases with relationships in them. :(
- RE: Oracle vs. DB2 UDB
- From: Allen, Brandon