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 EBEB711583 for ; Wed, 10 Sep 2014 15:49:08 +0000 (UTC) Received: (qmail 66774 invoked by uid 500); 10 Sep 2014 15:49:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 66730 invoked by uid 500); 10 Sep 2014 15:49:05 -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 66720 invoked by uid 99); 10 Sep 2014 15:49:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 15:49:05 +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 (athena.apache.org: domain of michalbudzyn@gmail.com designates 209.85.160.176 as permitted sender) Received: from [209.85.160.176] (HELO mail-yk0-f176.google.com) (209.85.160.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 15:49:00 +0000 Received: by mail-yk0-f176.google.com with SMTP id 131so2619204ykp.35 for ; Wed, 10 Sep 2014 08:48:39 -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=Xtsqdq4VtqN8pfExiMlwq9OFp/O55Vr2PmOTbMGCq6s=; b=YbhA9l/omFjs7AAV3Ju/cFoTeGBG0JVg3mC/aifYwxYMOcb01qZp2ipdx+Lj5zKFCE sQjIkGRoNDQ1gMdymT9LKBunMYXSV5L/Ps8pzkjx6fEj5zqH1ubTLZsFftvdAHTbi+33 Rr+jORb1y07irfUMon+csfBuyPQRT1fgtdo0aTfV5j4pbdGB6o0/SubuwxPtGiRwfdJa J0OGlbtYTe7QH7djiQ6/36l2kVUuPHwdDcQGk5yfyM2MN7JPBtm64U3jxmkp7ZQx+gK4 5vBLGXt3+BQr/i3Pq4o3Si167zLG2Am/fvxAdTEm9qv7NPb3ERXp4/4ZedbE5mpdVFpl J0jg== MIME-Version: 1.0 X-Received: by 10.236.134.177 with SMTP id s37mr13990146yhi.32.1410364119916; Wed, 10 Sep 2014 08:48:39 -0700 (PDT) Received: by 10.170.130.199 with HTTP; Wed, 10 Sep 2014 08:48:39 -0700 (PDT) Date: Wed, 10 Sep 2014 17:48:39 +0200 Message-ID: Subject: Storage: upsert vs. delete + insert From: Michal Budzyn To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf303a2e015f28b50502b7fc59 X-Virus-Checked: Checked by ClamAV on apache.org --20cf303a2e015f28b50502b7fc59 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Is there any serious difference in the used disk and memory storage between upsert and delete + insert ? e.g. 2 vs 2A + 2B. PK ((key), version, c1) 1. INSERT INTO A (key , version , c1, val) values (1, 1, 4711, =E2=80=9CX1= =E2=80=9D) ... 2. INSERT INTO A (key , version , c1, val) values (1, 1, 4711, =E2=80=9CX2= =E2=80=9D) Vs. 2A. DELETE FROM A WHERE key=3D1 AND version =3D 1 AND c1=3D4711 2B. INSERT INTO A (key , version , c1, values) values (1, 1, 4711, =E2=80= =9CX2=E2=80=9D) --20cf303a2e015f28b50502b7fc59 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Is there any serious difference in the used disk and = memory storage between upsert and delete + insert ? =C2=A0 =C2=A0=C2=A0

e.g. 2 vs 2A + 2B.

PK ((key)= , version, c1)
=C2=A0
1. INSERT INTO A (key , version ,= c1, val) values (1, 1, 4711, =E2=80=9CX1=E2=80=9D)
...
2. INSERT INTO A (key , version , c1, val) values (1, 1, 4711, =E2=80=9CX2= =E2=80=9D)
Vs.
2A. DELETE FROM A WHERE key=3D1 AND vers= ion =3D 1 AND c1=3D4711
2B. INSERT INTO A (key , version , c1, va= lues) values (1, 1, =C2=A04711, =E2=80=9CX2=E2=80=9D)

<= /div> --20cf303a2e015f28b50502b7fc59--