Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45AC1FD7F for ; Tue, 26 Mar 2013 05:15:17 +0000 (UTC) Received: (qmail 13824 invoked by uid 500); 26 Mar 2013 05:15:16 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 13663 invoked by uid 500); 26 Mar 2013 05:15:16 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 13626 invoked by uid 99); 26 Mar 2013 05:15:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 05:15:15 +0000 Date: Tue, 26 Mar 2013 05:15:15 +0000 (UTC) From: "Vijay (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-5357) Query cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-5357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13613504#comment-13613504 ] Vijay commented on CASSANDRA-5357: ---------------------------------- Ooops, I thought i was continuing the discussion from the other ticket... My bad. What i had in mind was to do something like Map so invalidation is O(1) To further improve the performance on a query (And deserializing the whole [QueryFilter,ColumnFamily] we can have all the QueryFilters as a part of the RowKey (Kind of like promoted index's). If we do this then the K (For a fat row) becomes big enough to cause more heap issue. Hence we could move that to off-heap along with CF. Query to a CF will be constant time (or O(m) where m is the size of queries within a row), Space complexity is also constant since we have the key is a off heap reference and a hash. There is one downside in this approche, if a row is hot all the queries will stay in memory longer (Unless we reimplement a cache like CLHM)... If we think this is big enough problem then we would need an alternative approach where we have 2 Maps one for and the other for mapping, which might not be that space efficient. Let me know. > Query cache > ----------- > > Key: CASSANDRA-5357 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5357 > Project: Cassandra > Issue Type: Bug > Reporter: Jonathan Ellis > Assignee: Vijay > > I think that most people expect the row cache to act like a query cache, because that's a reasonable model. Caching the entire partition is, in retrospect, not really reasonable, so it's not surprising that it catches people off guard, especially given the confusion we've inflicted on ourselves as to what a "row" constitutes. > I propose replacing it with a true query cache. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira