Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VEQxM-0003V4-FQ for pgsql-performance@arkaria.postgresql.org; Tue, 27 Aug 2013 21:37:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VEQxL-0007sy-U2 for pgsql-performance@arkaria.postgresql.org; Tue, 27 Aug 2013 21:37:43 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VEQxK-0007ss-WE for pgsql-performance@postgresql.org; Tue, 27 Aug 2013 21:37:43 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VEQxH-0005mL-RW for pgsql-performance@postgresql.org; Tue, 27 Aug 2013 21:37:42 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 1B421508C4E for ; Tue, 27 Aug 2013 23:37:39 +0200 (CEST) X-Virus-Scanned: G-Hosting.cz + Station.cz + Klenot.cz + Subreg.cz amavisd-new at antispam.gransy.com Received: from mail.gransy.com ([82.208.44.189]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id 9URY669Vc-8y for ; Tue, 27 Aug 2013 23:37:51 +0200 (CEST) Received: by mail.gransy.com (Postfix, from userid 5000) id 9CB85508C51; Tue, 27 Aug 2013 23:37:38 +0200 (CEST) Received: from [192.168.1.237] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 6A493508C4F for ; Tue, 27 Aug 2013 23:37:38 +0200 (CEST) Message-ID: <521D1C22.1030901@fuzzy.cz> Date: Tue, 27 Aug 2013 23:37:38 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Poor performance on simple queries compared to sql server express References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.0 (/) 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 Hi, On 27.8.2013 06:06, Adam Ma'ruf wrote: > Hi > > Thanks for the response. I reran the query but first ran the statement > you provided and set working mem to 2gb. It ended up taking 133s and > group aggregate was still used OK. > > Here are the values you asked for: > # - Planner Method Configuration - > # - Planner Cost Constants - All set to default, so seems fine to me. > > #seq_page_cost = 1.0# measured on an arbitrary scale > #random_page_cost = 4.0# same scale as above > #cpu_tuple_cost = 0.01# same scale as above > #cpu_index_tuple_cost = 0.005# same scale as above > #cpu_operator_cost = 0.0025# same scale as above > #effective_cache_size = 6000MB Well, if effective_cache_size is commented out, then it's still 128MB (default). But I don't think that matters here. > The output of select * from pg_statistics is large...should I attach it > as a separate file (not sure if that's allowed on these mailing lists) I haven't asked for pg_statistics dump. I asked for pg_settings (but I already got most of the important pieces above). > The data is ~2.5gb, I can't think of any place I can upload it. I can There's like a zillion of such places. E.g. Dropbox, Box, Wuala, Google Drive, mega.co.nz or one of the many other alternatives. All of them give you ~5GB space for free. Or I could give you access to my FTP server, if that's what you prefer. > provide the columns and data type. it's a subset of public data from > usaspending.gov Is there a simple way to download / filter the public data to get the same dataset as you have? Tomas -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance