Note that there are some explanatory texts on larger screens.

plurals
  1. POQuery not using Index --
    primarykey
    data
    text
    <p>My question concerns Oracle 11gr2 and the use of indexes in SQL queries. Please help me with issue below, I am unable to use index on this query:</p> <pre><code>SELECT ListingManagerID, FirstName, LastName, PrimaryPhone, AlternatePhone, Email, UserName, Password, RecallGuid, CustomerSince, PWChangeRequired, PWExpireDate, CallingHours, CreateDate, CreateIPAddress, LastLogin, AutoRenewFlag, LastUpdated, UpdatedBy, AutoRenewRemovedDate, AutoRenewDate, isSupplier, PrefferedLanguage, AboutMe, PictureFilePath, IsProfilePictureDisplay, LocaleID, Address1, Address2, CityID, CountryID, StateProvinceID, PostalCode, RegistrationSource, PPCTypeID, GhostUser, ProfileId, TimezoneID, OCA FROM ListingManager WHERE trim(lower(LISTINGMANAGERID)) = 'e.kkagacoe4aaae7rnr9lua5' </code></pre> <ol> <li>Created Index</li> </ol> <p><code>SQL&gt; CREATE INDEX IDX_LISTINGMANAGER_ID ON listingmanager (LOWER(listingmanagerid));</code></p> <p>Index created.</p> <ol> <li>Gather Statistics</li> </ol> <p><code>SQL&gt; EXEC DBMS_STATS.GATHER_TABLE_STATS('INTERSHOP', 'LISTINGMANAGER' , CASCADE=&gt;TRUE);</code></p> <p>PL/SQL procedure successfully completed.</p> <p>Index was created on <code>Listingmanager Column</code>, But still Execution plan is showing full table scan. I don't know why full table scan happening still.</p> <p>ListingManagerID is the primary key of the table, can I modify index created by primary key?</p> <pre><code>PLAN_TABLE_OUTPUT -------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| -------------------------------------------------- | 0 | SELECT STATEMENT | | 2013 | 487K| 1784 (1)| |* 1 | TABLE ACCESS FULL| LISTINGMANAGER | 2013 | 487K| 1784 (1)| </code></pre> <p>Predicate Information (identified by operation id):</p> <pre><code>1 - filter(TRIM(LOWER("LISTINGMANAGERID"))='e.kkagacoe4aaae7rnr9lua5' ) </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload