Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aT1LA-0003R7-My for pgsql-sql@arkaria.postgresql.org; Tue, 09 Feb 2016 05:59:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aT1LA-00071d-9A for pgsql-sql@arkaria.postgresql.org; Tue, 09 Feb 2016 05:59:56 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aT1L5-0006xt-TL for pgsql-sql@postgresql.org; Tue, 09 Feb 2016 05:59:51 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aT1J0-0006kN-6H for pgsql-sql@postgresql.org; Tue, 09 Feb 2016 05:57:43 +0000 Received: by mail-pa0-x233.google.com with SMTP id kp3so2604105pab.1 for ; Mon, 08 Feb 2016 21:57:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=My2o52Hffbn5Ge5lkJ4UwXmnfxcMr1zNOw4S/a/J/lU=; b=HiY+h8yM/aEBgh9p79ZopXKPVw4qw0FR85ccrmmACEoUf0rKFr9PXOZK7RZdBRqEOq 9nujPeepiARDe4c8PDo+4AAtDJ/6EfLwLy7cq/e47e+NETzW38dJBpcxr4Ddz15pWSMi J3bwHikR0nlGvZRZRtPURG0rpCHYnRbRPFWNLsIEB32GOulOgbi+FHAXSAU0Gjx4D2lo d5wuc5b8nyN3X70VSwTe7+ke4QiFn/dgYHpQu1lnSASq1t4u8O4XAGZx9bvniigAuafV b86kL89NJUEPv/AK0sBibLu1OOHhHi6b8OW+mzN0InBu5tjgPTTUUwzJV9SnIv/8q0my xIMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=My2o52Hffbn5Ge5lkJ4UwXmnfxcMr1zNOw4S/a/J/lU=; b=IFAptAhtqeMjZq5gQ7BhWCUu8d/8TLcUVoRnlMVZJfZ04SCbNBPHRrFDfWSdgUmZeC dfYQ5iU2m6hU3ETOAZd0jGDUTfP4KcNBXRLxqqQHZ3ID9Gc18D/YwVjxbVGg/iyOknuC opi+ZqVL+qw/OxTTpxIIxTKt2f0TcES99VLTN4kRxl5O/lmdGlAhybMv75cEGa5Gt8An t6/4lO2gncSBl0Qe3yIceGbUqN4oVsc5lPvM6RTJwGA/TwG3CMUvn+yUCRrwld2qJ8RA MvUglF9XukXtbKf1U1LEnkyY0qBG+NdLazVNetnxlViWtcYY4RCTRDV2CmwxntlHG2KT BGOQ== X-Gm-Message-State: AG10YORtNWqXMohAIZsuSvDYJaw3XlkXJIZmOTm29YiJgqHqLRMCdy0O4qE1Zya0htQ44Q== X-Received: by 10.66.218.40 with SMTP id pd8mr48536071pac.159.1454997459411; Mon, 08 Feb 2016 21:57:39 -0800 (PST) Received: from [155.100.214.120] ([155.100.214.120]) by smtp.gmail.com with ESMTPSA id yx4sm33927577pac.5.2016.02.08.21.57.37 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Feb 2016 21:57:38 -0800 (PST) Subject: Re: Question on PostgreSQL DB behavior w.r.t JOIN and sort order. To: pgsql-sql@postgresql.org References: <21082.1454994009@sss.pgh.pa.us> From: Rob Sargent Message-ID: <56B97FD1.4070008@gmail.com> Date: Mon, 8 Feb 2016 22:57:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------090709050308050909020008" X-Pg-Spam-Score: -1.7 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org This is a multi-part message in MIME format. --------------090709050308050909020008 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 02/08/2016 10:53 PM, Venkatesan, Sekhar wrote: > > Yes. is there an option/configuration to tell the postgres > optimizer/planner to generate plans to include the sort order instead > of speed? > > *From:*David G. Johnston [mailto:david.g.johnston@gmail.com] > *Sent:* Tuesday, February 09, 2016 11:20 AM > *To:* Venkatesan, Sekhar > *Cc:* Tom Lane; pgsql-sql@postgresql.org > *Subject:* Re: [SQL] Question on PostgreSQL DB behavior w.r.t JOIN and > sort order. > > On Monday, February 8, 2016, Venkatesan, Sekhar > > wrote: > > Is there a way to tell the optimizer to retain the sort order if that > is possible please? > > You mean, besides the ORDER BY clause? > > David J. > Which order would that be? --------------090709050308050909020008 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 02/08/2016 10:53 PM, Venkatesan, Sekhar wrote:

Yes. is there an option/configuration to tell the postgres optimizer/planner to generate plans to include the sort order instead of speed?

 

From: David G. Johnston [mailto:david.g.johnston@gmail.com]
Sent: Tuesday, February 09, 2016 11:20 AM
To: Venkatesan, Sekhar
Cc: Tom Lane; pgsql-sql@postgresql.org
Subject: Re: [SQL] Question on PostgreSQL DB behavior w.r.t JOIN and sort order.

 

On Monday, February 8, 2016, Venkatesan, Sekhar <sekhar.venkatesan@emc.com> wrote:

Is there a way to tell the optimizer to retain the sort order if that is possible please?

 

 

You mean, besides the ORDER BY clause?

 

David J. 

Which order would that be?

--------------090709050308050909020008--