![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Index inclusion: an index should not include a other one. Why is this wrong? Thanks Eric |
#3
| |||
| |||
|
|
Eric - I'm unfamiliar with this error. Precisely what software are you running, what is the context for receiving this error, and can you please state the precise error message along with the SQLCODE or SQLSTATE you're seeing. Thanks Glenn ontsnapt wrote: Index inclusion: an index should not include a other one. Why is this wrong? Thanks Eric |
#4
| |||
| |||
|
|
Hello, I use powerdesigner to create a SQL Anywhere database. When creating two indexes on the same table where the second has all columns from index 1 except the last one I get this warning. I thought this had to do with SQL anywhere 10 because thats the target. So maybe its not necessary to create a second index that has all columns of a other index except the last one. Thats what I wanted to check. Thanks Eric Glenn Paulley [Sybase iAnywhere] wrote: Eric - I'm unfamiliar with this error. Precisely what software are you running, what is the context for receiving this error, and can you please state the precise error message along with the SQLCODE or SQLSTATE you're seeing. Thanks Glenn ontsnapt wrote: Index inclusion: an index should not include a other one. Why is this wrong? Thanks Eric |
#5
| |||
| |||
|
|
I am as puzzled as you - are you telling me that Powerbuilder will present this message if I have CREATE TABLE FOO (X INT, Y INT) and then CREATE INDEX FOO1 ON FOO(X ASC) CREATE INDEX FOO2 ON FOO(X ASC, Y ASC) ? There are perfectly valid reasons for doing this - for queries that contain only a sargable predicate on column X, FOO1 may be the more efficient index to use since it will have fewer leaf pages than FOO2. Glenn ontsnapt wrote: Hello, I use powerdesigner to create a SQL Anywhere database. When creating two indexes on the same table where the second has all columns from index 1 except the last one I get this warning. I thought this had to do with SQL anywhere 10 because thats the target. So maybe its not necessary to create a second index that has all columns of a other index except the last one. Thats what I wanted to check. Thanks Eric Glenn Paulley [Sybase iAnywhere] wrote: Eric - I'm unfamiliar with this error. Precisely what software are you running, what is the context for receiving this error, and can you please state the precise error message along with the SQLCODE or SQLSTATE you're seeing. Thanks Glenn ontsnapt wrote: Index inclusion: an index should not include a other one. Why is this wrong? Thanks Eric |
#6
| |||
| |||
|
|
Hello, Not powerbuilder but Powerdesigner. I tried it with this example and get a warning about index inclusion. So, if it is correct should I ask it in the powerdesigner newsgroup? Thanks Eric Glenn Paulley [Sybase iAnywhere] wrote: I am as puzzled as you - are you telling me that Powerbuilder will present this message if I have CREATE TABLE FOO (X INT, Y INT) and then CREATE INDEX FOO1 ON FOO(X ASC) CREATE INDEX FOO2 ON FOO(X ASC, Y ASC) ? There are perfectly valid reasons for doing this - for queries that contain only a sargable predicate on column X, FOO1 may be the more efficient index to use since it will have fewer leaf pages than FOO2. Glenn ontsnapt wrote: Hello, I use powerdesigner to create a SQL Anywhere database. When creating two indexes on the same table where the second has all columns from index 1 except the last one I get this warning. I thought this had to do with SQL anywhere 10 because thats the target. So maybe its not necessary to create a second index that has all columns of a other index except the last one. Thats what I wanted to check. Thanks Eric Glenn Paulley [Sybase iAnywhere] wrote: Eric - I'm unfamiliar with this error. Precisely what software are you running, what is the context for receiving this error, and can you please state the precise error message along with the SQLCODE or SQLSTATE you're seeing. Thanks Glenn ontsnapt wrote: Index inclusion: an index should not include a other one. Why is this wrong? Thanks Eric |
#7
| |||
| |||
|
|
Index inclusion: an index should not include a other one. Why is this wrong? Thanks Eric |
#8
| |||
| |||
|
|
Sorry about the typo, I realize you said PowerDesigner. I would certainly ask this question in the powerdesigner newsgroup. I would also ask if PowerDesigner gives a different message (or no message at all) under other circumstances. For example, if one has column X that's a INTEGER and column Y that is a VARCHAR(255) there are several reasons why one might desire indexes on all four combinations (X), (XY), (YX), (Y) depending on the queries in the workload. Glenn ontsnapt wrote: Hello, Not powerbuilder but Powerdesigner. I tried it with this example and get a warning about index inclusion. So, if it is correct should I ask it in the powerdesigner newsgroup? Thanks Eric Glenn Paulley [Sybase iAnywhere] wrote: I am as puzzled as you - are you telling me that Powerbuilder will present this message if I have CREATE TABLE FOO (X INT, Y INT) and then CREATE INDEX FOO1 ON FOO(X ASC) CREATE INDEX FOO2 ON FOO(X ASC, Y ASC) ? There are perfectly valid reasons for doing this - for queries that contain only a sargable predicate on column X, FOO1 may be the more efficient index to use since it will have fewer leaf pages than FOO2. Glenn ontsnapt wrote: Hello, I use powerdesigner to create a SQL Anywhere database. When creating two indexes on the same table where the second has all columns from index 1 except the last one I get this warning. I thought this had to do with SQL anywhere 10 because thats the target. So maybe its not necessary to create a second index that has all columns of a other index except the last one. Thats what I wanted to check. Thanks Eric Glenn Paulley [Sybase iAnywhere] wrote: Eric - I'm unfamiliar with this error. Precisely what software are you running, what is the context for receiving this error, and can you please state the precise error message along with the SQLCODE or SQLSTATE you're seeing. Thanks Glenn ontsnapt wrote: Index inclusion: an index should not include a other one. Why is this wrong? Thanks Eric |
![]() |
| Thread Tools | |
| Display Modes | |
| |