Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Thu, 09 Jun 2011 05:44:16 -0500 Date: Thu, 09 Jun 2011 11:44:16 +0100 From: bugbear User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.19) Gecko/20110429 Fedora/2.0.14-1.fc13 SeaMonkey/2.0.14 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Storing large strings for future equality checks References: <19aedpuwexqkx$.dlg@kimmeringer.de> <95bfpaFgboU1@mid.individual.net> In-Reply-To: <95bfpaFgboU1@mid.individual.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <__KdncFXQ4icOW3QnZ2dnUVZ8qednZ2d@brightview.co.uk> Lines: 25 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-U33TD4dPyyTeTAh8KKVwz1Nai9iTQ5c2pqCMN0Ir66NQnV3507YrDdeVMTwPurZQLgK9lwlzSduGqvE!K8p3pSoyYlEWynD5pMkGpu3tmJEBUPmJ87RRe3i7grS72EFzxWvKKTlz7PcfBmRhqzjKaVTA0+Dw!UBnixYLQ9Qv/ZvrP0iIsUTanbg== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2066 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5155 Harry Tuttle wrote: > Lothar Kimmeringer, 08.06.2011 20:31: >> Depends on the database. Some of them force you to use CLOBS for >> text-columns with more than 255 characters. CLOBS are a PITA in >> terms of indexing. > > No serious DBMS requires you to use a CLOB for columns with more than > 255 characters. > > The least flexible "big" name is Oracle, which has a limit of 4000 > bytes. Beyond that a CLOB is needed. > > Most others have a much larger limit on VARCHAR columns (32k, 64k, 1GB, > ...) Agreed, seconded etc. To OP; just store the strings as you need, make sure the column is indexed, and simply query with your input string in the "obvious" way. Unless this *proves* to be a catastrophe (which I doubt)... job done. BugBear