×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help with Indexes

Help with Indexes

Help with Indexes

(OP)
Can someone please tell me what I am doing wrong here??

EXECUTED IN PERVASIVE 9.5
CREATE TABLE "CHARACTERS" using 'wccuser2.dat'(
 "userid" VARCHAR(30),
 "username" VARCHAR(30),
 "unsignedbinary" UINTEGER
);
CREATE UNIQUE NOT MODIFIABLE INDEX "key0" ON "CHARACTERS"("userid");
CREATE INDEX "key1" ON "CHARACTERS"("username");
CREATE INDEX "key2" ON "CHARACTERS"("unsignedbinary");
SELECT X$Index.* from X$Index WHERE Xi$file in (SELECT Xf$Id FROM X$File WHERE Xf$Name = 'CHARACTERS')

Result
<<<<<<<<<<<<<<<<<<<<<<<<
CREATE TABLE "CHARACTERS" using 'wccuser2.dat'(
 "userid" VARCHAR(30),
 "username" VARCHAR(30),
 "unsignedbinary" UINTEGER
)
SQL statement(script) has executed successfully.
0 rows were affected.
>>>>>>>>>>>>>>>>>>>>>>>>

<<<<<<<<<<<<<<<<<<<<<<<<
CREATE UNIQUE NOT MODIFIABLE INDEX "key0" ON "CHARACTERS"("userid")
SQL statement(script) has executed successfully.
0 rows were affected.
>>>>>>>>>>>>>>>>>>>>>>>>

<<<<<<<<<<<<<<<<<<<<<<<<
CREATE INDEX "key1" ON "CHARACTERS"("username")
SQL statement(script) has executed successfully.
0 rows were affected.
>>>>>>>>>>>>>>>>>>>>>>>>

<<<<<<<<<<<<<<<<<<<<<<<<
CREATE INDEX "key2" ON "CHARACTERS"("unsignedbinary")
SQL statement(script) has executed successfully.
0 rows were affected.
>>>>>>>>>>>>>>>>>>>>>>>>

<<<<<<<<<<<<<<<<<<<<<<<<
Xi$File   Xi$Field   Xi$Number   Xi$Part   Xi$Flags
=======   ========   =========   =======   ========
     24        275           3         0        384
     24        276           4         0        387
     24        277           5         0        387

3 rows were affected.

>>>>>>>>>>>>>>>>>>>>>>>>

For some reason its putting my new indexes in index 3, 4 and 5 instead of index 0, 1 and 2.

Here is what I get when I run CheckDB.

===============================================
Problems Detected with Database Definitions
===============================================
+++++++++++++++++++++++++++++++++++++++++++++++
Table Name  =  CHARACTERS

The Data File Index is Not Defined in the Dictionary.
The data file defines index 0 seg 0
The dictionary does not.
The Data File Index is Not Defined in the Dictionary.
The data file defines index 1 seg 0
The dictionary does not.
The Data File Index is Not Defined in the Dictionary.
The data file defines index 2 seg 0
The dictionary does not.


===============================================

Any assistance would be much appreciated I'm racking my brain here.

RE: Help with Indexes

(OP)
CORRECTION
CREATE UNIQUE NOT MODIFIABLE INDEX "key0" IN DICTIONARY ON "CHARACTERS"("userid");
CREATE INDEX "key1" IN DICTIONARY ON "CHARACTERS"("username");
CREATE INDEX "key2" IN DICTIONARY ON "CHARACTERS"("unsignedbinary");

Same results.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close