|Subject||Re: [firebird-support] Re: First word after in alphabetical order|
> That is the first thing you should check. Get yourself an admin toolIBPlanalyzer website is down right now.
> that graphically shows you the plan of the query. IBPlanalyzer is
> simple enough and free.
> Is this the exact query you are running or is this a simplifiedIt is not the exact query, I changed names. All the details :
> representation of your actual query?
- my server is a celeron 333 MHz with 256 MB memory
- it runs under linux with SME server 6.0 (fork of RH7.3, see
- I insralled FB using a rpm : FirebirdSS-126.96.36.19931-0.i686.rpm
- I am using IBOConsole with interactive SQL for my test
- my database have a single table (see definition at bottom):
- I filled my table using an external table (source file that I modified
: http://earth-info.nga.mil/gns/html/cntry_files.html). There are
5,000,000 rows. I distroyed indexes before filling it and I recreated
indexes after so they should be clean.
- test query is :
SELECT FIRST 11
ORDER BY WP_NOM;
PS : table definition
/* Table: WAYPOINTS, Owner: SYSDBA */
CREATE TABLE "WAYPOINTS"
"ID_WAYPOINT" INTEGER NOT NULL,
"WP_NOM" CHAR(8) CHARACTER SET ASCII NOT NULL,
"WP_COMMENTAIRE" VARCHAR(20) CHARACTER SET ISO8859_1,
"WP_LATITUDE" DOUBLE PRECISION NOT NULL,
"WP_LONGITUDE" DOUBLE PRECISION NOT NULL,
CONSTRAINT "PK_WAYPOINTS" PRIMARY KEY ("ID_WAYPOINT")
/* Index definitions for WAYPOINTS */
CREATE INDEX "IDX_WP_LAT" ON "WAYPOINTS"("WP_LATITUDE");
CREATE INDEX "IDX_WP_LONG" ON "WAYPOINTS"("WP_LONGITUDE");
CREATE INDEX "IDX_WP_NOM" ON "WAYPOINTS"("WP_NOM");
CREATE DESCENDING INDEX "IDX_WP_NOM_DESC" ON "WAYPOINTS"("WP_NOM");
SET TERM ^ ;
/* Triggers only will work for SQL triggers */
CREATE TRIGGER "TRIG_WAYPOINTS_1" FOR "WAYPOINTS"
ACTIVE BEFORE INSERT POSITION 0
/* code here */
if (new.ID_WAYPOINT is NULL) then
new.ID_WAYPOINT = gen_id(NomGenerateur,1);
COMMIT WORK ^
SET TERM ;^