>>>>>>>>>>>> Jeffrey Lichtman wrote (2005-11-02 11:46:30): > > Here are some more examples, assuming that nulls are not stored in indexes: > > CREATE TABLE t2 (i INTEGER, j INTEGER NOT NULL); > CREATE INDEX idx3 on t2(i); > CREATE UNIQUE INDEX idx4 on t2(j); > > SELECT i FROM t2; -- use index idx3 (covers query) > SELECT j FROM t2; -- Do a table scan
Shouldn't the last SELECT use idx4 since the index is UNIQUE *and* j is NOT NULL? -- Bernt Marius Johnsen, Database Technology Group, Sun Microsystems, Trondheim, Norway
pgp7yrBchyk5D.pgp
Description: PGP signature
