• sonia singh 14
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)
Any solution for this error kindly provide I am querying on Account for populating self lookup with the help of trigger it has more 4 lac records .
 

<apex:component allowDML="true">
<apex:attribute name="pkbCon" type="pkb_Controller" required="true" description="handle to the pkb controller" />
<apex:attribute name="HomeCatgryName" type="string" required="false" description="category name from home page" />
<apex:variable var="category" value="{!pkbCon.selectedCategory}" />
<!-- POPULAR PAGE SIZE: {!pkbCon.popularArticles}<br/> RESULTS PAGE SIZE: {!pkbCon.articlesPerPage}<br/> CURRENT PAGE: {!pkbCon.currPage}<br/> LANG: {!pkbCon.selectedLanguage}<br/> CATEGORY USED: {!category}<br/> categories={!category}.. /summary={!a.summary} / articleTypeName={!a.articleTypeName} / articleTypeLabel={!a.articleTypeLabel} / -->
<!-- 15June,2015 --> <apex:variable var="categoryTyp" value="{!IF(HomeCatgryName == 'consumerBtnLink', 'Topics:All', 'Military:All')}"/>
<apex:variable var="categoryTyp" value="{!IF(HomeCatgryName == 'militryBtnLink', 'Military:All', 'Topics:All')}"/> <!-- categories="{!category}" -->
<div> <!--<h2 class="section">{!$Label.PKB2_Popular_Articles}</h2>--> <knowledge:articleList articleVar="a" language="{!pkbCon.selectedLanguage}"
sortBy="mostViewed" pageSize="{!pkbCon.popularArticles}"
categories="{!categoryTyp}" pageNumber="1">
<c:pkb_article pkbCon="{!pkbCon}"
aid="{!a.id}"
title="{!a.title}"
summary="{!a.summary}"
urlName="{!a.urlName}"
articleTypeName="{!a.articleTypeName}"
articleTypeLabel="{!a.articleTypeLabel}"
lastModifiedDate="{!a.lastModifiedDate}"
firstPublishedDate="{!a.firstPublishedDate}"
lastPublishedDate="{!a.lastPublishedDate}"
FromHomeCatgryName="{!HomeCatgryName}" />
</knowledge:articleList>
</div>
</apex:component>

<apex:component allowDML="true">
<apex:attribute name="pkbCon" type="pkb_Controller" required="true" description="handle to the pkb controller" />
<apex:attribute name="HomeCatgryName" type="string" required="false" description="category name from home page" />
<apex:variable var="category" value="{!pkbCon.selectedCategory}" />
<!-- POPULAR PAGE SIZE: {!pkbCon.popularArticles}<br/> RESULTS PAGE SIZE: {!pkbCon.articlesPerPage}<br/> CURRENT PAGE: {!pkbCon.currPage}<br/> LANG: {!pkbCon.selectedLanguage}<br/> CATEGORY USED: {!category}<br/> categories={!category}.. /summary={!a.summary} / articleTypeName={!a.articleTypeName} / articleTypeLabel={!a.articleTypeLabel} / -->
<!-- 15June,2015 --> <apex:variable var="categoryTyp" value="{!IF(HomeCatgryName == 'consumerBtnLink', 'Topics:All', 'Military:All')}"/>
<apex:variable var="categoryTyp" value="{!IF(HomeCatgryName == 'militryBtnLink', 'Military:All', 'Topics:All')}"/> <!-- categories="{!category}" -->
<div> <!--<h2 class="section">{!$Label.PKB2_Popular_Articles}</h2>--> <knowledge:articleList articleVar="a" language="{!pkbCon.selectedLanguage}"
sortBy="mostViewed" pageSize="{!pkbCon.popularArticles}"
categories="{!categoryTyp}" pageNumber="1">
<c:pkb_article pkbCon="{!pkbCon}"
aid="{!a.id}"
title="{!a.title}"
summary="{!a.summary}"
urlName="{!a.urlName}"
articleTypeName="{!a.articleTypeName}"
articleTypeLabel="{!a.articleTypeLabel}"
lastModifiedDate="{!a.lastModifiedDate}"
firstPublishedDate="{!a.firstPublishedDate}"
lastPublishedDate="{!a.lastPublishedDate}"
FromHomeCatgryName="{!HomeCatgryName}" />
</knowledge:articleList>
</div>
</apex:component>