??? wrote:
>      For example, tableA contains two columns: implicit rowid, A_id.
>      we create index on A_id.
>      firstly, we used rowid to select the row, cost about 400 seconds;
>      secondly, we used A_id to select the row, cost about 200 seconds;
>      thirdly, we also used rowid to select the row, cost about 200 seconds.

This can be explained by the data being cached.

>      if firstly,we used A_id to select the row, cost about 200 seconds;
>     the create index on A_id may have some influence to do with the rowid.
> and from this example, I also think the rowid is not implicit index.

If all columns of the table are contained in the index, then the "select *"
can read all values from the index itself, without having to look up the
row in the original table.  This is called a covering index.

If your table has more columns, lookups on A_id will become slower.


Regards,
Clemens

Reply via email to