db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Karp <dk...@zimbra.com>
Subject Re: Queries satisfiable from indexes
Date Tue, 20 Mar 2007 20:26:56 GMT
> In the case of the query plan you presented, it seems
> to me that Derby is in fact using the index, and not the
> base table; that's what I believe this line is saying:
> > Index Scan ResultSet for MAIL_ITEM using index I_MAIL_ITEM_TAGS_DATE

I believe that's included for every query satisfied using an index.  But the number of pages
accessed indicates that it actually loaded all the rows from the table:

   scan information:
Bit set of columns fetched={0, 1}
Number of columns fetched=2
Number of deleted rows visited=20458
Number of pages visited=501
Number of rows qualified=141512
Number of rows visited=161970

I think that's *way* too many pages hit if we're just using the index.  I've had a query on
this table that sorted 33,000 rows without an index, and it only visited 300+ pages.

View raw message