The below won’t perform well. You’ve used a filter query, which will be
cached, so you’ll end up forever invalidating your cache.

Better would be http://localhost:8983/solr/select?q=id:153

Perhaps better still would be http://localhost:8983/solr/get?id=153

The latter is a “real time get” which will return a document that hasn’t
even been soft-committed yet.

As to which performs better, I’d encourage you to set up a simple
experiment, and try it out.

Upayavira

On Fri, Mar 27, 2015, at 06:56 AM, Aman Tandon wrote:
> Hi,
> 
> Does an ID based filtering on solr will perform poor than DB?
> 
> <field name"id" type"string" indexed="true" stored="true">
> 
>    - http://localhost:8983/solr/select?q=*&fq=id:153
> 
>    *OR*
> 
>    - select * from TABLE where id=153
> 
> 
> With Regards
> Aman Tandon

Reply via email to