Subject | Re: [firebird-support] Re: optimization question (select) |
---|---|
Author | Arno Brinkman |
Post date | 2009-12-05T22:58:01Z |
Hi,
and "fetch time".
What is the difference in speed between (with an index on FieldA and an index on FieldB)
SELECT
FIRST 1 *
FROM
TableX x
WHERE
x.FieldA > 1 and x.FieldA < 10000000 and
x.FieldB > 5 and x.FieldB < 6
and
SELECT
*
FROM
TableX x
WHERE
x.FieldA > 1 and x.FieldA < 10000000 and
x.FieldB > 5 and x.FieldB < 6
Do you always need to fetch all rows?
Which Firebird version are you using?
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info
> unfortunatly put an index on fieldA and another on fieldB not help ! same speed (or i missCould (or may be you already do) also test the difference between the time for the "index builds"
> something, i probably write badly the query plan ?)
and "fetch time".
What is the difference in speed between (with an index on FieldA and an index on FieldB)
SELECT
FIRST 1 *
FROM
TableX x
WHERE
x.FieldA > 1 and x.FieldA < 10000000 and
x.FieldB > 5 and x.FieldB < 6
and
SELECT
*
FROM
TableX x
WHERE
x.FieldA > 1 and x.FieldA < 10000000 and
x.FieldB > 5 and x.FieldB < 6
Do you always need to fetch all rows?
Which Firebird version are you using?
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info