Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am facing the titled error. I searched for the issue on google found manmy people facing the same issue but non of them matches my scenario.

I have a simple query but there are 100,000 of conditions. query looks like.

SELECT TEXT,LANG,PLANTCODE FROM DROP_VALUE WHERE FIELDNAME='PROFIT_CTR' AND PLANTCODE IN ('953306843','469940529','293294653',......100,000 conditions)

I am using eclipse JUNO and (on the same local machine) sql server 2008 r2 enterprise edition.
Windows 7 professional
8 gb RAM
i3 processor.
3gb memory allocated for JVM.

Please suggest me possible causes.

share|improve this question
1  
100K values is a huge number to put in an IN list, have you seen this question? Note that one of the answers describes getting a resource error with around 100K values. – Pondlife Apr 18 at 16:58
thanks for very informative link – Amit Sharma Apr 18 at 17:26

1 Answer

If you can, move the conditions to a table structure and JOIN to it.

share|improve this answer
excellent alternative.... – Amit Sharma Apr 18 at 17:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.