Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-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 9CD8B4679 for ; Tue, 31 May 2011 20:58:11 +0000 (UTC) Received: (qmail 74851 invoked by uid 500); 31 May 2011 20:58:09 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 74824 invoked by uid 500); 31 May 2011 20:58:09 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 74816 invoked by uid 99); 31 May 2011 20:58:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 20:58:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of victor.kabdebon@gmail.com designates 209.85.161.44 as permitted sender) Received: from [209.85.161.44] (HELO mail-fx0-f44.google.com) (209.85.161.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 20:58:03 +0000 Received: by fxm15 with SMTP id 15so3778981fxm.31 for ; Tue, 31 May 2011 13:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=Qq0NhG0zDTcAu4co06qU7aEtKNqdotwPIXhA7UMrqDA=; b=KYTN2L1FxmMPplbsjOQZgDvO61ryCjRVoY0oqs0KT/EQ51t70uRs9rFzos0w+n35C+ 8iYBZ2v1zDt7wFDRhrgJgsNtjZ0Nl7eGfqutKhkxLSTEkPRWG1VVAYPOvYnbY/uYTE7x fgAByRuuLqSYb/HQpHPEgL3t/G4+79MrBa4/U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=xz409zJZ32YKp+ZVA5yUpnwcUOqFRjmOTQ2/K3pP6gYeCUimkKz5rq8oMNdyMV2oE3 pAmVokQcEZiRzSxoIQ6u+HY24kqBg7D56hP6/h7HsXsgO4BK9gCOCvtKaSirTBbS23kD +PEGzzrhQsH8OFcYQtLRNGhu30Ju/Ng3rN/dI= Received: by 10.223.55.200 with SMTP id v8mr1796131fag.82.1306875463299; Tue, 31 May 2011 13:57:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.159.131 with HTTP; Tue, 31 May 2011 13:57:23 -0700 (PDT) In-Reply-To: References: From: Victor Kabdebon Date: Tue, 31 May 2011 16:57:23 -0400 Message-ID: Subject: Re: Appending to fields To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=00151747616ec1722f04a498a786 X-Virus-Checked: Checked by ClamAV on apache.org --00151747616ec1722f04a498a786 Content-Type: text/plain; charset=ISO-8859-1 As Jonathan stated I believe that the insert is in O(N + M), unless there are some operations that I don't know. There are other NoSQL database that can be used with Cassandra as "buffers" for quick access and modification and then after the content can be dumped into Cassandra for long term storage. Here is an example with Redis : http://redis.io/commands/append The "append" command is said to be in O(1) but it is a little bit suspicious to me... Best regards, Victor Kabdebon http://www.voxnucleus.fr 2011/5/31 Jonathan Ellis > On Tue, May 31, 2011 at 2:22 PM, Marcus Bointon > wrote: > > mysql reads the entire value of y, appends the data, then writes the > whole thing back, which unfortunately is an O(n^2) operation. > > Actually, this analysis is incorrect. Appending M bytes to N is O(N + > M) which isn't the same as N^2 at all. > > At least in Cassandra, nor can I think of any possible algorithm which > would allow MySQL to achieve N^2, but I don't claim to be an expert > there. > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com > --00151747616ec1722f04a498a786 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
As Jonathan stated I believe that the insert is in O(N + M), unless th= ere are some operations that I don't know.

The= re are other NoSQL database that =A0can be used with Cassandra as "buf= fers" for quick access and modification and then after the content can= be dumped into Cassandra for long term storage. Here is an example with Re= dis :

The "append" command is said t= o be in O(1) but it is a little bit suspicious to me...