Subject | Re: [firebird-support] Union and Order by optimization |
---|---|
Author | Arno Brinkman |
Post date | 2009-12-06T12:52:24Z |
Hi,
select
first 10 skip 0 *
from
BIGTABLE
where
(FieldA = xxx and fieldB = yyy) OR
(FieldA = www and fieldB = yyy)
order by
FieldA, FieldB
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
> but now i m facing another problem because i need to do :Out of curiousity, what result gives this query:
>
> select first 10 skip 0 * from BIGTABLE where
> (FieldA = xxx OR FieldA = www) and
> fieldB = yyy
> order by FieldA,
> FieldB
> PLAN (BIGTABLE ORDER fieldAFieldB)
>
> result given in 1000 ms...
> not work very effeciently :(
select
first 10 skip 0 *
from
BIGTABLE
where
(FieldA = xxx and fieldB = yyy) OR
(FieldA = www and fieldB = yyy)
order by
FieldA, FieldB
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