Subject | Re: [firebird-support] Re: Compound Index |
---|---|
Author | Arno Brinkman |
Post date | 2007-05-03T08:02:14Z |
Hi,
SELECT FIRST 10 * FROM MY_TABLE WHERE COLUMN1 >= 101 ORDER BY COLUMN1, COLUMN2
<snip>
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer 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
Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info
>> It is not question whether it helps much or not. Without ORDER BYAs Ivan already suggested what is the nr. of reads if you use this query :
>> the query does not make sense at all.
>
> I've added the order by clause and retried it with IBOConsole to check
> the statistics.
>
> The query is SELECT FIRST 10 * FROM MY_TABLE WHERE COLUMN1 > 100 ORDER
> BY COLUMN1, COLUMN2
SELECT FIRST 10 * FROM MY_TABLE WHERE COLUMN1 >= 101 ORDER BY COLUMN1, COLUMN2
<snip>
> Plan: PLAN (MY_TABLE ORDER MY_INDEX INDEX (MY_INDEX))The Rows Affected number is something i don't get yet.
> Rows affected: 89901
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer 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
Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info