Re: small table takes more time as compared to bigger table
Date: Sat, 28 May 2011 03:07:47 -0700 (PDT)
..I noticed a few things that may be relevant to the discussion.
From the original post:
> I run the query as below for 16000 times for different values of col4
> in where clause-
> select col1, col4, col6 from TABLE1 where col4='SOMEVALUE'
> This finish in few milliseconds
> I run the following query for 16000 times for different values of col4
> in where clause
> select col1, col4, col6 from TABLE2 where col4='SOMEVALUE'
> TABLE1 and TABLE2 are indexed on col1.
If the WHERE clause in queries for both tables are restricted on "col4", of what relevance is it to have an index on "col1"? Whatever optimization that was introduced by indexing col1 is most likely not even used.
Rich Pascual Received on Sat May 28 2011 - 05:07:47 CDT