Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9vu9-000534-Vr for pgsql-performance@arkaria.postgresql.org; Wed, 01 Nov 2017 16:30:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9vu9-0004hW-IP for pgsql-performance@arkaria.postgresql.org; Wed, 01 Nov 2017 16:30:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9vsM-00017j-3T for pgsql-performance@postgresql.org; Wed, 01 Nov 2017 16:28:22 +0000 Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e9vsD-0006LB-TH for pgsql-performance@postgresql.org; Wed, 01 Nov 2017 16:28:19 +0000 Received: by mail-pg0-x230.google.com with SMTP id b192so2535566pga.2 for ; Wed, 01 Nov 2017 09:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5brwRWPr6LemMI9ja5246ulFXXtDyjbXyRT4Etmf5dw=; b=uow1x4Y7aBSNa9hipTTvUmEVtAK4ADh2A57DtWOXoaeV0/dQchSPZHs4zoKc5zYTYK 1cuAlVYUOH1TWodFJMNZrL6s1HCzWaUDnlEt3KRIKDoD26rNXVbGUArIjJvAbc3heEFO JY0J00BCtc5N7BMC7m9E5vKk0mCAQNZhDem28F7Wb37lR3j4Yc5CT1y1903diaSmOZ5C eq0raIkRQBrN9txJJm0BDc/2PLeLEABts5wYvv9RAqiXvPnK/DRO64ojwnzuVv1z9faK SpleYfsRvMxgDfqCRltkaqoevYgmY7NoLYDlVBPqWbOSWQxyxCPL4vQ9jezDbl3+9IOW k7Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5brwRWPr6LemMI9ja5246ulFXXtDyjbXyRT4Etmf5dw=; b=LtZbXE/OQf0rhRhQe7KTv2nNQyF5+0gTXV5FOqqFKmli79AwMVoGabAVWEwH63p1Gq LujFBPcW8WIGZwzVvJb3kkfkHK5DDDi48U4ygOdaf4zrKdfuyeo3Op7R8muj8yzpzbhf a7IiiHjK83aHMZLO/a05NC2Zlh9qTZ7jueMDcBYVFJ5tItMpv+GLp9H4wG+gdHdyl4c5 KLni+EKo2T5DaYPQF/+cUKx9fX5V8NvtF7d1zbpJiAFLepgWP1j6WTg4ApopYG0a8hjP aS0rLLKRuwdDPixeQBAB1d9p5dUtfCqgMomwoZLesadNsob/93OggEDxsiXUvkR8uybD 2EBQ== X-Gm-Message-State: AMCzsaWd6CWRx1iK6vPfLWGwbqG8ZkdWXYejRe1/F6qb8enPJpQHJH4O 5qnxIx3ld4PTg02OJip61x8W7GBP5QxBD3YATFk= X-Google-Smtp-Source: ABhQp+TUzj4IDHacRaO6wfHibOpBlrjJIlUQljTneMSMWTnUjZ7E76LAQ5axskCrB/WKNo4EunXATTewXn9+tUatU5U= X-Received: by 10.99.127.67 with SMTP id p3mr407553pgn.321.1509553692678; Wed, 01 Nov 2017 09:28:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.160.235 with HTTP; Wed, 1 Nov 2017 09:28:12 -0700 (PDT) In-Reply-To: <1509403866560-0.post@n3.nabble.com> References: <1509403866560-0.post@n3.nabble.com> From: Merlin Moncure Date: Wed, 1 Nov 2017 11:28:12 -0500 Message-ID: Subject: Re: Cursor vs Set Operation To: patibandlakoshal Cc: postgres performance list Content-Type: text/plain; charset="UTF-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On Mon, Oct 30, 2017 at 5:51 PM, patibandlakoshal wrote: > From performance standpoint I thought set operation was better than Cursor. > But I found Cursor to be more effective than Set operation. Is there a way > we can force optimizer to use cursor plan. QUERY PLAN You're going to have to be a little more specific. In particular, I have no idea what a 'cursor plan' is. What precise operations did you do? merlin -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance