Lucene will work perfectly for what you need. Use a "RangeFilter" for the latitude/longitude and a "Sort" on your population. If you have a crazy amount of data and limited memory, you can modify lucene easily (open source) to to handle filtering and sorting in a more "memory friendly" way. Since you only have 2 million records, I think lucene, out of the box, is exactly what you're looking for. It will perform extremely well.
Tony Schwartz [EMAIL PROTECTED] "We're going to need a lot more cowbell." -----Original Message----- From: Dave Kor [mailto:[EMAIL PROTECTED] Sent: Thursday, July 28, 2005 10:44 AM To: java-user@lucene.apache.org; Andrew Boyd Subject: Re: Lucene vs Derby (vs MySQL) for spatial indexing Quoting Andrew Boyd <[EMAIL PROTECTED]>: > I did a small demonstration application using lucene's range query and it > worked fine. > I didn't use a DB at all > > > "Mosul_Iraq.html", "E043.13535" > "Mosul_Iraq.html", "N36.33608" > > Having the directional (E, W, N, S) worked out well > > Andrew The reason Lucene is called a search engine and not a database is because it is optimized for text-data or data which obey zipf's law. Sure, you can use Lucene on data that doesn't obey zipf's law, but there will be an linearly increasing (or is it exponential?) performance cost. As you add more ordinal data (especially floating point numbers) to Lucene, you increase the time taken for each and every single query. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]