John Siracusa wrote:
SELECT * FROM t WHERE a = 1 AND b = 2 AND c = 3 ORDER BY b;
Let's say the table just has one index:
CREATE INDEX b_idx ON t (b);
In this case, obviously the b_idx will be used and no sorting after the fact
will be required. Now let's add an index:
CREATE INDEX k
On Fri, 6 Feb 2004, John Siracusa wrote:
> Are indexes useful for speeding up ORDER BY clauses? Example:
>
> CREATE TABLE t
> (
> a INT,
> b INT,
> c INT,
> d INT
> );
>
> SELECT * FROM t WHERE a = 1 AND b = 2 AND c = 3 ORDER BY b;
>
> Let's say the table j
Are indexes useful for speeding up ORDER BY clauses? Example:
CREATE TABLE t
(
a INT,
b INT,
c INT,
d INT
);
SELECT * FROM t WHERE a = 1 AND b = 2 AND c = 3 ORDER BY b;
Let's say the table just has one index:
CREATE INDEX b_idx ON t (b);
In this cas