Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7ABFA200BAF for ; Mon, 31 Oct 2016 19:23:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 794E0160B05; Mon, 31 Oct 2016 18:23:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BFD4A160AED for ; Mon, 31 Oct 2016 19:23:21 +0100 (CET) Received: (qmail 67915 invoked by uid 500); 31 Oct 2016 18:23:21 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 67899 invoked by uid 99); 31 Oct 2016 18:23:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Oct 2016 18:23:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 513C8CAE2B for ; Mon, 31 Oct 2016 18:23:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id PomcMLF79w4V for ; Mon, 31 Oct 2016 18:23:19 +0000 (UTC) Received: from mail-yw0-f180.google.com (mail-yw0-f180.google.com [209.85.161.180]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 510205F3A1 for ; Mon, 31 Oct 2016 18:23:19 +0000 (UTC) Received: by mail-yw0-f180.google.com with SMTP id r204so42329056ywb.0 for ; Mon, 31 Oct 2016 11:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=ZzRcVbD5J0SYDQcUxqmFTVxc/c8aX7XDCBAAlfWwQyc=; b=q9tDtuE4keLGpWR3Dy/qz3zyf+urcd5csZzoCtKBQryZYMalteFjwpNOflh+9sVfp2 movpbZGhvogv1WQgtKbl291A3tWh6F3FPEa4sMkC8X3eA1d8cZNzr1QpFUKbKLEAg/Ns hr7Q/at+Uxh494AorRrahSVfeMWAASVhjb1hfKHZjSWcrNeUlGGbqGK93J3GMZd3z+8U vqFE2Y+/hUzyEFpjtFdAujtivFXY1/wSQ37Iwsg+Ww3IPtm2RmsC4M85gExv7tnzp2Mt P3UL4sJu7LF0BODNie5ohvZc/el9aakGVv5Kose2LtPyaLnGC5X67Icpcng4NIi+ECA4 qkrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=ZzRcVbD5J0SYDQcUxqmFTVxc/c8aX7XDCBAAlfWwQyc=; b=bq5WwtMwgq0aHMm3BPOz/edBtNZJ8W3XPyitgcLgsx6zJ0Atq9FCWADg3OgxZOmRYX A2N4jpEZHcz6HBLtu61EsmK3+CsThXqIA+TCfz8/tgjxe4TwTmYm6BLSBxS7HqGvcHrx EKXhyPQU80ZWbgUimnBgq+yHQcYeMyw7oYG3gFVF2FxGZv4URtLV+4gB2hRSpwqwWZef Adbfu1QO6FLdmadDcGiNJYElrSp4PDcLgj5r4zS+7fE3iTi+3LCenRXdwoy2m9lRCjXe kpnz5S5igyFIOAk81BLdE/ax9WpwmtCXY3iH4qBpAhP09S5sjOlB/0KUTamYSB94Wt69 zOOg== X-Gm-Message-State: ABUngvej5tOxWfasxYgWuH8Xdt+Ivl/rlrzGozKBuYswffQcthI68HYnRQlQRHQ46u4+dlbem5sShBcQu29q1g== X-Received: by 10.129.80.3 with SMTP id e3mr3243828ywb.147.1477938194265; Mon, 31 Oct 2016 11:23:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.220.134 with HTTP; Mon, 31 Oct 2016 11:23:13 -0700 (PDT) In-Reply-To: References: From: Yingyi Bu Date: Mon, 31 Oct 2016 11:23:13 -0700 Message-ID: Subject: Re: About the Multiple Join Optimization on AsterixDB To: dev@asterixdb.apache.org Content-Type: multipart/alternative; boundary=001a1147fcce11bc6a05402d4df0 archived-at: Mon, 31 Oct 2016 18:23:22 -0000 --001a1147fcce11bc6a05402d4df0 Content-Type: text/plain; charset=UTF-8 Mingda, I'm not sure how much re-ordering can be done at the Hyracks level, i.e., the runtime level. In the optimizer (the asterixdb/algebricks level), we don't have re-ordering for joins, because: --- the cost model has not been added yet. I'm not sure about the timeline for this. @Ildar? --- respecting user-specified join orders is important for certain cases, for example, to get stable/predictable performance (zero surprise) for applications. In the runtime, we have a role-reversal optimization in hybrid hash join, which is a safe optimization that is not based on estimations. You can look at OptimizedHybridHashJoin. Best, Yingyi On Mon, Oct 31, 2016 at 11:16 AM, mingda li wrote: > Dear all, > > Hi, I am working on multiple join on Hyracks level. I am not sure if I do > the multiple join on AsterixDB, whether it will optimize the query by > changing the join order or just execute according to how we write the > query. I think this may not be done in Algebricks level based on rule but > not sure. > > Bests, > Mingda > --001a1147fcce11bc6a05402d4df0--