Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C61BA9C77 for ; Tue, 10 Apr 2012 20:40:55 +0000 (UTC) Received: (qmail 9197 invoked by uid 500); 10 Apr 2012 20:40:53 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 8978 invoked by uid 500); 10 Apr 2012 20:40:53 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 8969 invoked by uid 99); 10 Apr 2012 20:40:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 20:40:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hiren.t.shah@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 20:40:46 +0000 Received: by werc1 with SMTP id c1so195948wer.35 for ; Tue, 10 Apr 2012 13:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=l+5t1oheQ63oJ4EOHP3+y1uQacE1UuTse4ELCUri9Ew=; b=cHEbZzEfdGz5X9Knc3+YgNMmtCeoocJFGHShBe7uewgvqXBkwv53F7QKRgFdjrfFOZ jx/mQ6aJAnx2fLDDSuKZnGvlUTn5XjXC6Z2VKvVwGrvtW3JMB8M3ox+W/B7qvci1sJBl XPjEz8GvupRRh4QrBP9AwN0NSSoU/LT8ZURsXyHYGtwQJr1Zk7BwWT948jFASK49mEWJ V1ylj2Feos2vbvXLac15PeFeExRSp/lDMNFC9xy83xfBUJy+Gph1dgMatAj/LPRS7QwC iOKVRe/6iCJK4LOayCNtIybj3d31iB/cG8E0GmJQCq6IkeW3FivObp+UhPkrtkydnnuh Yrpg== MIME-Version: 1.0 Received: by 10.216.139.25 with SMTP id b25mr6886904wej.41.1334090426625; Tue, 10 Apr 2012 13:40:26 -0700 (PDT) Received: by 10.223.155.76 with HTTP; Tue, 10 Apr 2012 13:40:26 -0700 (PDT) Date: Wed, 11 Apr 2012 02:10:26 +0530 Message-ID: Subject: Query for "cache" mechanism to used From: Hiren Shah To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e6d59d69fa2edc04bd592124 --0016e6d59d69fa2edc04bd592124 Content-Type: text/plain; charset=ISO-8859-1 I have a requirement to get results of search query within 1 second for a database table.The database table is returning results slowly at this point.A table has to be moved to a cache and searched from there so that search results come fast.I want to do google type page refresh on my existing search page -- which means the page should refresh as the user types. In order to acheive this the search results should return within one second.My database is teradata.Its queries are taking 2 to 3 seconds at least.Hence i want to look for other options like caching.I want to use cache so that the resuls come fast. Columns are *company , Id , Industry, parent ...4 more* Its a search page.So if user types "ja" all items starting from ja like *company ------------- Id ------------- Industry --------------parent* jaico ------------- 222 -------------paints ------------- Jaico asia Jammy fruits------------- 232-------------food------------- jammy International The table contains 3.2 million rows and there are 8 columns that are present.The search data need to return all 8 columns.Considering byte wise there are 150 chars per row.So total bytes are 3.2 million * 150 chars = 480 Megabytes .I need to store this much data in cache and then fire search queries like sql (grouping ,like ,order by) across them.What would be the best option to use in this case 1. ehcache 2. jboss cache 3. Inifinispan 4. Apache Lucene Please suggest which option is good .Is it better to do caching in memory or to use lucene? *What need to be cached?-->* It is a table of 3.2 million rows with 8 columns. *Why it is to be cached?-->* It is to be cached so that search results come *faster* than sql query.If i use sql query it takes very long time.Hence i want to move towards caching data. --0016e6d59d69fa2edc04bd592124--