473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

That works faster in DB2 for creation of an index?

HELLO all

That works faster in DB2 for creation of an index:
CREATE INDEX
or
Alter Table tab ADD INDEX
for Import?

Thanks.

Aug 23 '07 #1
1 1750
Pi*************@gmail.com wrote:
That works faster in DB2 for creation of an index:
CREATE INDEX
or
Alter Table tab ADD INDEX
for Import?
The first one works, the second doesn't because it is already syntactically
incorrect.

You can add constraints to a table and unique constraints (primary keys are
just unique constraints) use a unique index under the covers for their
implementation. Aside from that, you have the CREATE INDEX statement to
create indexes.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Aug 23 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Aaron | last post by:
Does Microsoft SQL Server keep a record of an index creation date and last modified date in a system table somewhere?
5
by: Tompa | last post by:
Hi, I would like to create images on the fly as a response to an http request. I can do this with PIL like this (file create_gif.py): from PIL import Image, ImageDraw print 'Status: 200 OK'...
3
by: eric.nave | last post by:
In a situation where you have two tables in a hierarchy like this: create table authors (authorid int identity (1,1)) create table books ( authorid int, bookid int identity (1,1) ) Is...
8
by: dbamota | last post by:
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
6
by: Steven Wolf | last post by:
Hi guys, can a hashtable be faster than a sql server?? i made my own O/R mapping with an "entity cache" (caching all mapped objects). So, when i get some data from my sql server, i map that data...
2
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...
17
by: onkar | last post by:
which one runs faster ?? for(i=0;i<100;i++) for(j=0;j<10;j++) a=0; OR for(j=0;j<10;j++) for(i=0;i<100;i++)
12
by: vunet.us | last post by:
Is there a suggestion I can make this code run faster: if(document.getElementById("1")){ doOne(); } if(document.getElementById("2")){ doTwo(); } .......................
1
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.
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.