|
From: <dh...@le...> - 2003-10-09 23:00:25
|
Okay, I have tried in it RC6, and it still crashes on my main machine. I
did a fresh install on another machine (both XP) and it doesn't crash, but
says
SQL> select max(id) from metrics PLAN (METRICS INDEX (RDB$PRIMARY11));
Statement failed, SQLCODE = -284
index RDB$PRIMARY11 cannot be used in the specified plan
Which I don't understand!
SQL> show index metrics;
RDB$PRIMARY11 UNIQUE INDEX ON METRICS(ID)
shows that this index is the primary key on metrics, and there are no other
indexes on the table.
I am trying to speed up MIN and MAX (and COUNT for that matter) on primary
key - any ideas?
Cheers,
David
---------------------- Forwarded by David Hay/Lex/Lexmark on 09/10/2003
04:47 PM ---------------------------
David Hay
09/10/2003 01:25 PM
To: fir...@li...
cc:
Subject: BUG? Specifying PLAN in SELECT crashes server
Hi,
I'm using Firebird 1.5 RC5, and trying to specify the PLAN to use when I do
a query.
I have a table called Metrics, with a primary key of Id.
If I do "set plan;" and then "SELECT * FROM METRICS WHERE ID=2" I see, as
expected that it is using the primary key:
PLAN (METRICS INDEX (RDB$PRIMARY5))
When I try and specify the plan, however, apparently when the SELECT
statement does not have a WHERE clause, the Firebird Server crashes!
To test this, I trying the following:
SELECT * FROM METRICS WHERE ID=2 PLAN (METRICS INDEX (RDB$PRIMARY5));
and everything worked fine.
However, if I do
SELECT * FROM METRICS PLAN (METRICS INDEX (RDB$PRIMARY5));
or
SELECT MIN(Id) FROM METRICS PLAN (METRICS INDEX (RDB$PRIMARY5));
the server crashes, and isql shows
Statement failed, SQLCODE = -901
connection lost to database
Am I doing something wrong here (quite possible!) or is this a bug.
Cheers,
David
|