Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 78579 invoked from network); 25 Aug 2010 20:25:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Aug 2010 20:25:45 -0000 Received: (qmail 31655 invoked by uid 500); 25 Aug 2010 20:25:42 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 31541 invoked by uid 500); 25 Aug 2010 20:25:42 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 31533 invoked by uid 99); 25 Aug 2010 20:25:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Aug 2010 20:25:42 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yseeley@gmail.com designates 209.85.215.48 as permitted sender) Received: from [209.85.215.48] (HELO mail-ew0-f48.google.com) (209.85.215.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Aug 2010 20:25:37 +0000 Received: by ewy10 with SMTP id 10so849843ewy.35 for ; Wed, 25 Aug 2010 13:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=PdZZhrhBTqkli00jCpftHqHobbOa37ryvmcH4FiMg1Q=; b=L3utbPQbGIWUKMH6bi5xd+hPcesqpak6RaDxxAxjX8o4MAxEOaauWxEuikMVWldbg2 jjq4DHnnlRSwd0LIZtMNwDvXPfwG7IvJUxWz2JoyJ3o6YX8eO+OlOnZ4QI86xB7ltez+ ft5bDHP0j0Xh/Zucm/6JOPeizf5u0CKmG9C74= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=GHPh/ggMSvyo+5l+oeTFtGJdsDZGCHJHQgsjeOkeDKUdFw+9zLj/3CZgWqsWQCVR2o Lte48alziZ8DKqGlxVkP8ks/ZgvbciaWFN3Tf2rHuZBuxg0MYjGXiofnv1s7NujcmhdK kQ+KCETPRfIygZ3kDjxCyYpv1XYwRrGaJwSPE= MIME-Version: 1.0 Received: by 10.216.193.195 with SMTP id k45mr7829892wen.32.1282767916030; Wed, 25 Aug 2010 13:25:16 -0700 (PDT) Sender: yseeley@gmail.com Reply-To: yonik@lucidimagination.com Received: by 10.216.48.11 with HTTP; Wed, 25 Aug 2010 13:25:15 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 Aug 2010 16:25:15 -0400 X-Google-Sender-Auth: 8lzdFDXJqivbxi7x9o6x-wzBIZE Message-ID: Subject: Re: Slow facet sorting - lex vs count From: Yonik Seeley To: solr-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Wed, Aug 25, 2010 at 7:22 AM, Eric Grobler wrote: > Hi Solr experts, > > There is a huge difference doing facet sorting on lex vs count > The strange thing is that count sorting is fast when setting a small limit. > I realize I can do sorting in the client, but I am just curious why this is. > > FAST - 16ms > facet.field=city > f.city.facet.limit=5000 > f.city.facet.sort=lex > > FAST - 20 ms > facet.field=city > f.city.facet.limit=50 > f.city.facet.sort=count > > SLOW - over 1 second > facet.field=city > f.city.facet.limit=5000 > f.city.facet.sort=count FYI, I just tried my own single-valued faceting test: 10M documents, query matches 1M docs, faceting on a field that has 100,000 unique values: facet.limit=100 -> 35ms facet.limit=5000 -> 44ms facet.limit=50000 -> 100ms The times are reported via QTime (i.e. they do not include the time to write out the response to the client). Maybe you're running into memory issues because of the size of the BoundedTreeSet, response size, etc, and garbage collection is taking up a lot of time? -Yonik http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8