From dev-return-49396-archive-asf-public=cust-asf.ponee.io@couchdb.apache.org Mon May 25 16:04:26 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 070C918062C for ; Mon, 25 May 2020 18:04:25 +0200 (CEST) Received: (qmail 83437 invoked by uid 500); 25 May 2020 16:04:24 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 83425 invoked by uid 99); 25 May 2020 16:04:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2020 16:04:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id F06BB1A43CE for ; Mon, 25 May 2020 16:04:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.201 X-Spam-Level: X-Spam-Status: No, score=-0.201 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id wgJmaz2cKytK for ; Mon, 25 May 2020 16:04:22 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.180; helo=mail-lj1-f180.google.com; envelope-from=ermouth@gmail.com; receiver= Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 8EEE5BB8CA for ; Mon, 25 May 2020 16:04:22 +0000 (UTC) Received: by mail-lj1-f180.google.com with SMTP id b6so21305817ljj.1 for ; Mon, 25 May 2020 09:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:in-reply-to:to; bh=xmVXRhZlWFCndNb9UpFfz4kQ83lv2C66oSFzM03zCjk=; b=lRdIFdpduIk23x1TdfkWmEvjzvg2VWY8IYMrct4Hk4/ZSPfd/o7EO7ZGEAwfYzBCoA a8kGcQUQ1UefjNjWgpkkJnZKIY1wwrGLDWItHf2xVd+K0N1GOhHwOITsbeSECnqHE6dE zLXfKRB5lfO7clSNGf5hXNhyr3uyikXqnpvqtPfD8+C9Mq6VSunTqT60Dd10QuWkYn+Y Ch2KvXV7pTJNfw3VuHJ6OjpcJX0EtvqYjxKMSHFvuWhEHV8P/5YpCdbkX0BEZAhonW+3 Nfhf/O4q5bSl6/W+02J2SZHxhZkolf7CWcbd77TOPyI/43PmXH26GBxG/f9HbsEUbkaB DTLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:in-reply-to:to; bh=xmVXRhZlWFCndNb9UpFfz4kQ83lv2C66oSFzM03zCjk=; b=RVvohS6hgduwzLyKZTHBiLb4CPjWduOX4SivqlsKpeMCesNBRQnXnrSHhtpa+QgXWX HF4mVYojCR4XZPKsmkl1vRNpAHuxsOPmCWLnCeLgLNk14xvytoLnwtA3CqJf6wMNN7a5 i9/d5JAMnvvUZmvfLxBCc4zyKPeoFeuoZkb2Ef1fy4J9J4/EDRj+X1GWlmUBRA4Re30U W4RLOtfsRBQLTpO4D31RPTE0v7pOkX9OSt9eW1ooLoWF+ZQFqth/c3Xpb1uMjuORCEeg T/mduZvMXDtI4rPzNQnfCTt6BD6yOsalu/GiS3gY8547jevtK2MIjR/g44XkL/pRaWo/ LCww== X-Gm-Message-State: AOAM531T8yuPCDWCkPHuJT45IIHinKOKTmatKsaCWnw79SqgFvtAx7hA 9RNjrwst8plN79wFUT+8BLkLEnf5 X-Google-Smtp-Source: ABdhPJz9OgibDaprvPTNZyRfTvR3Fnu60ww3GSyvrfFEoxVelOyclZihX3dO1YV6zsaDT/MVNWo5IQ== X-Received: by 2002:a2e:a294:: with SMTP id k20mr3463294lja.165.1590422654948; Mon, 25 May 2020 09:04:14 -0700 (PDT) Received: from [192.168.0.228] ([62.192.241.224]) by smtp.gmail.com with ESMTPSA id k6sm706050ljj.32.2020.05.25.09.04.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2020 09:04:14 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: ermouth Mime-Version: 1.0 (1.0) Subject: Re: Partitions list Date: Mon, 25 May 2020 19:04:13 +0300 Message-Id: <5E12F281-20F2-46AA-A7F4-FB39A764B48A@gmail.com> References: In-Reply-To: To: dev@couchdb.apache.org X-Mailer: iPhone Mail (17E262) This is great, thanks! ermouth > 25 =D0=BC=D0=B0=D1=8F 2020 =D0=B3., =D0=B2 10:25, Glynn Bird =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 > =EF=BB=BFIf you need a relatively small list of partition keys, (let's say= you want > to allow a user to paginate through the partition keys in blocks of 10, > say) then it's probably more efficient to perform a sequence of calls to > _all_docs, fetching the "first" document of each partition key like so: >=20 > https://gist.github.com/glynnbird/73fea65a12b0c420562108a80ea0c449 >=20 > This consumes one _all_docs?limit=3D1 request per partition key you need a= nd > may be more efficient than reading all the ids in a database. >=20 > >=20 >> On Mon, 25 May 2020 at 00:30, ermouth wrote: >>=20 >> Thanks! >>=20 >>> comp sci theoretically nothing that=E2=80=99ll be any more >>> efficient internally than the obvious map/reduce view >>=20 >> This probably doesn=E2=80=99t hold in real world at least for DBs you kno= w upfront >> have number_of_partitions =E2=89=83 number_of_docs < several_thousands. R= eading all >> _id-s without reduce is likely cheaper in that case. Which means I might >> just read _id-s for DBs having say < 10k docs, without writing a ddoc wit= h >> map/reduce view and waiting it to warm up. Or I can allow user to choose >> what to do. >>=20 >> ermouth >>=20 >>=20 >> =D0=BF=D0=BD, 25 =D0=BC=D0=B0=D1=8F 2020 =D0=B3. =D0=B2 01:58, Paul Davis= : >>=20 >>> Currently no, and comp sci theoretically nothing that=E2=80=99ll be any m= ore >>> efficient internally than the obvious map/reduce view. >>>=20 >>>> On Sun, May 24, 2020 at 12:48 PM ermouth wrote: >>>=20 >>>> Hi devs, >>>>=20 >>>> is there a way to get the list of DB partitions, except dedicated >>>> map/reduce? Trying to add partitioned queries UI into Photon and bit >>> stuck >>>> how to implement it. >>>>=20 >>>> ermouth >>>>=20 >>>=20 >>=20