Brett, It's really interesting observation. I can only speculate. It's worth to check cache hit stats and cache content via http://wiki.apache.org/solr/SolrCaching#showItems (the key question what are cached doc sets classes). Also if you tell the overall number of docs in the index, and cardinality of both filters, it might allow to guess something. Anyway, jvisualvm sampling can give an exact answer. Giving responses, it's enough to profile one of the slave nodes.
On Wed, Jun 4, 2014 at 10:32 PM, Brett Hoerner <br...@bretthoerner.com> wrote: > The following two queries are doing the same thing, one using a "normal" fq > range query and another using a parent query. The cache is warm (these are > both hits) but the "normal" ones takes ~6 to 7.5sec while the parent query > hack takes ~1.2sec. > > Is this expected? Is there anything "wrong" with my "normal fq" query? My > plan is to increase the size of my perSegFilter cache so I can use the hack > for faster queries... any thoughts here? > > "responseHeader": { "status": 0, "QTime": 7657, "params": { "q": "*:*", " > facet.field": "terms_smnd", "debug": "true", "indent": "true", "fq": [ > "created_at_tdid:[1392768001 > TO 1393954400]", "text:coffee" ], "rows": "0", "wt": "json", "facet": > "true", > "_": "1401906435914" } }, "response": { "numFound": 2432754, "start": 0, " > maxScore": 1, "docs": [] } > > Full response example: > > https://gist.githubusercontent.com/bretthoerner/60418f08a88093c30220/raw/0a61f013f763e68985c15c5ed6cad6fa253182b9/gistfile1.txt > > "responseHeader": { "status": 0, "QTime": 1210, "params": { "q": "*:*", " > facet.field": "terms_smnd", "debug": "true", "indent": "true", "fq": [ > "{!cache=false}{!parent > which='created_at_tdid:[1392768001 TO 1393954400]'}", "text:coffee" ], > "rows": > "0", "wt": "json", "facet": "true", "_": "1401906444521" } }, "response": { > "numFound": 2432754, "start": 0, "maxScore": 1, "docs": [] } > > Full response example: > > https://gist.githubusercontent.com/bretthoerner/9d82aa8fe59ffc7ff6ab/raw/560a395a0933870a5d2ac736b58805d8fab7f758/gistfile1.txt > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>