What is the syntax in UDB db2, to create an index IX in table TBL "in
tablespace TBSP" which is different from the tablespace of TBL ? TIA 8 4887
This is for Version 8.1.4 http://publib.boulder.ibm.com/infoce...n/r0000919.htm
PM
"dbamota" <db***@nashfinch.com> a écrit dans le message de
news:a8**************************@posting.google.c om... What is the syntax in UDB db2, to create an index IX in table TBL "in tablespace TBSP" which is different from the tablespace of TBL ? TIA
"dbamota" <db***@nashfinch.com> wrote in message
news:a8**************************@posting.google.c om... What is the syntax in UDB db2, to create an index IX in table TBL "in tablespace TBSP" which is different from the tablespace of TBL ? TIA
The tablespace used for an index depends how the table was defined. If the
create table specified a separate tablespace is to be used for indexes on
that table, then the named tablespace will be used for all indexes on the
that table. Otherwise, the indexes will be placed in the same tablespace as
the table. Check the SQL Reference manual.
Raj's question is not answered. He wants to know if, regardless of
what kind of tablespace is used, an index based on a string is as
efficient as an index based on an integer.
Also, if using a string in an index, is a VARCHAR as efficient as a
CHAR.
(I am adding:) Does the answer depend on how large the index is? Eg,
less than 20,000 rows vs more than 100,000 rows?
Raj's question is not answered. He wants to know if, regardless of
what kind of tablespace is used, an index based on a string is as
efficient as an index based on an integer.
Also, if using a string in an index, is a VARCHAR as efficient as a
CHAR.
(I am adding:) Does the answer depend on how large the index is? Eg,
less than 20,000 rows vs more than 100,000 rows?
You posted to the wrong thread i think...
PM
"Stanley Sinclair" <st*************@bellsouth.net> a écrit dans le message
de news:6f**************************@posting.google.c om... Raj's question is not answered. He wants to know if, regardless of what kind of tablespace is used, an index based on a string is as efficient as an index based on an integer.
Also, if using a string in an index, is a VARCHAR as efficient as a CHAR.
(I am adding:) Does the answer depend on how large the index is? Eg, less than 20,000 rows vs more than 100,000 rows?
You posted to the wrong thread i think...
PM
"Stanley Sinclair" <st*************@bellsouth.net> a écrit dans le message
de news:6f**************************@posting.google.c om... Raj's question is not answered. He wants to know if, regardless of what kind of tablespace is used, an index based on a string is as efficient as an index based on an integer.
Also, if using a string in an index, is a VARCHAR as efficient as a CHAR.
(I am adding:) Does the answer depend on how large the index is? Eg, less than 20,000 rows vs more than 100,000 rows?
"Stanley Sinclair" <st*************@bellsouth.net> wrote in message
news:6f**************************@posting.google.c om... Raj's question is not answered. He wants to know if, regardless of what kind of tablespace is used, an index based on a string is as efficient as an index based on an integer.
Indexes based on integers are usually "faster" than indexes based on char()
strings. This is simply because integer keys can be compared more quickly
than character strings.
Also, if using a string in an index, is a VARCHAR as efficient as a CHAR.
VARCHARs will be slighly more efficient than CHARs, since the length of the
key is known ahead of time.
(I am adding:) Does the answer depend on how large the index is? Eg, less than 20,000 rows vs more than 100,000 rows?
Potentially. More rows in the table may mean more levels in the btree
structure of the index. Each additional level requires another page to be
read from disk, as well as an extra set of key comparisons.
--
Matt Emmerton
DB2 OLTP Performance
IBM Toronto Lab
"Stanley Sinclair" <st*************@bellsouth.net> wrote in message
news:6f**************************@posting.google.c om... Raj's question is not answered. He wants to know if, regardless of what kind of tablespace is used, an index based on a string is as efficient as an index based on an integer.
Indexes based on integers are usually "faster" than indexes based on char()
strings. This is simply because integer keys can be compared more quickly
than character strings.
Also, if using a string in an index, is a VARCHAR as efficient as a CHAR.
VARCHARs will be slighly more efficient than CHARs, since the length of the
key is known ahead of time.
(I am adding:) Does the answer depend on how large the index is? Eg, less than 20,000 rows vs more than 100,000 rows?
Potentially. More rows in the table may mean more levels in the btree
structure of the index. Each additional level requires another page to be
read from disk, as well as an extra set of key comparisons.
--
Matt Emmerton
DB2 OLTP Performance
IBM Toronto Lab This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Guy Deprez |
last post by:
Hi,
i'm having a problem to create indexes.
STEP 1
-----------
Connection is OK (you can find the string at the end of the message)
Table ("Couleurs") creation is OK
STEP 2. Index Creation
|
by: Andr? Queiroz |
last post by:
Hi,
I have a table with 10M records and col A has a index created on it.
The data on that table has the same value for col A on all 10M
records. After that I insert diferent values for that column...
|
by: Sean C. |
last post by:
Helpful folks,
Most of my previous experience with DB2 was on s390 mainframe systems
and the optimizer on this platform always seemed very predictable and
consistent. Since moving to a WinNT/UDB...
|
by: Markus Keuthmann |
last post by:
Anybody knows a restriction for an index creation on a text column?
How deep can an index for a text go?
Somebody told me that a MySQL-Index has a restriction on 255 strings!
And DB2? Is there...
|
by: Xela |
last post by:
Hi
I am facing the following problem. I load a fact table with around 25
millons lines, and 7 indexes. I load it with 3 million line subsets. I am on
a quadriprocessor Solaris machine. The...
|
by: chettiar |
last post by:
Hi,
I am dropping an index and recreating it to lower the high water mark.
The index creation is taking a lot of time. I am stuck as to why it
does so. Is there any way that I can find out why...
|
by: db2udbgirl |
last post by:
Hello, The create index statement executes for the past 1 hour while
trying to add a new index to a logically partitioned table which has 58
million records. Is there a command/utilit where I can...
|
by: Laurence |
last post by:
Hi there,
How to differentiate between unique constraint and unique index? These
are very similar but I cannot differentiate them?
Could someone give me a hand?
Thanks in advance
|
by: Picaso.Leonardo |
last post by:
Hello all
That works faster in Mysql for creation of an index:
CREATE INDEX
or
ALTER TABLE tab ADD INDEX
Thanks.
|
by: Picaso.Leonardo |
last post by:
HELLO all
That works faster in DB2 for creation of an index:
CREATE INDEX
or
Alter Table tab ADD INDEX
for Import?
Thanks.
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |