Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C4CEF6336BF for ; Thu, 7 Jan 2010 19:09:10 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 87279-07 for ; Thu, 7 Jan 2010 23:09:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mail.postgresql.org (Postfix) with ESMTP id BE52F63369B for ; Thu, 7 Jan 2010 19:08:59 -0400 (AST) Received: by fxm27 with SMTP id 27so4237733fxm.3 for ; Thu, 07 Jan 2010 15:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=B2L5h9mtRvshV/l3WubMGYm2KSD0eRIcglbqeEtVfcQ=; b=UX0L1Xfxm1D6JvnCVcC4kfaeYbDdXwMHQOE73TfrimeAWhWe2e4yuBtWWL66s0y5Ib UdFvFVNl5FDy8qUEYOPM6n1QKT8yfXmF0v65hnYuM8PRFWAv20viUM8OBpqvx+jXGbe7 U8K5bzGXa6h+QYfw/jjwgd8YNRMGpmkjcOAmU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mU4s4r6/y9bd436BdY5w2xGqjzjpWu/UyBVIx8k03zB0OEO8xgvHRtMV+PzFdfLbIu JRsxOSdnCtpklcqKg7RX66Ozq8VuooStxllSLT+dbl7lr17KsnXlnHJOo3rAUWtnN5AK KhVxMOAi9vLbhzAOvwCfxqOqtKX5UulCgkjfs= MIME-Version: 1.0 Received: by 10.239.190.1 with SMTP id v1mr2224076hbh.122.1262905737716; Thu, 07 Jan 2010 15:08:57 -0800 (PST) In-Reply-To: <852badbc1001071457m42d4042brbb5c6b5fa7efce20@mail.gmail.com> References: <852badbc1001070438j36eb10d3qa22398ffcbef405f@mail.gmail.com> <4B45E36E.4040706@tweakers.net> <852badbc1001070547p48b47175vf87efc473e3bd41b@mail.gmail.com> <26014999.20100107150535@erwied.eu> <852badbc1001070610p698dc3cfr4628b1e7768990e6@mail.gmail.com> <4B465E7B.3060904@2ndquadrant.com> <852badbc1001071457m42d4042brbb5c6b5fa7efce20@mail.gmail.com> Date: Fri, 8 Jan 2010 00:08:57 +0100 Message-ID: <852badbc1001071508q2fb0739av79bf4d5bf29f3c9a@mail.gmail.com> Subject: Re: Air-traffic benchmark From: Lefteris To: Greg Smith Cc: Jochen Erwied , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.589 tagged_above=-10 required=5 tests=BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188 X-Spam-Level: X-Archive-Number: 201001/126 X-Sequence-Number: 37006 On Thu, Jan 7, 2010 at 11:57 PM, Lefteris wrote: > Hi Greg, > > thank you for your help. The changes I did on the dataset was just > removing the last comma from the CSV files as it was interpreted by pg > as an extra column. The schema I used, the load script and queries can > be found at: > > http://homepages.cwi.nl/~lsidir/postgres/ > > (I understood that if I attach these files here, my email will not > reach the list so I give you a link to download them). > > Also since you are interesting on the benchmark, you can also check > > http://homepages.cwi.nl/~mk/ontimeReport > > for a report of various experiments with MonetDB and comparison with > previously published numbers. > > The schema I used for pg is slightly different from that one of > MonetDB since the delay fields could not be parsed by pg as integers > but only as varchar(4). Hence the extra index on DepDelay field:) Sorry, I mean the ArrTime DepTime fields were changed, because they apear on the data as HHMM, but these fields were not used on the queries. The index on DepDelay was done for q3,4,5 and 7 > > Also at http://homepages.cwi.nl/~lsidir/PostgreSQL-ontimeReport you > can see the detailed times I got from postgres. > > I really appreciate your help! this is a great opportunity for me to > get some feeling and insights on postgres since I never had the chance > to use it in a large scale project. > > lefteris > > > On Thu, Jan 7, 2010 at 11:21 PM, Greg Smith wrote: >> Lefteris wrote: >>> >>> So we all agree that the problem is on the scans:) >>> >>> So the next question is why changing shared memory buffers will fix >>> that? i only have one session with one connection, do I have like many >>> reader workers or something? >>> >> >> I wouldn't expect it to. =A0Large sequential scans like this one are opt= imized >> in PostgreSQL to only use up a small portion of the shared_buffers cache= . >> =A0Allocating more RAM to the database won't improve the fact that you'r= e >> spending the whole time waiting for physical I/O to happen very much. >> >> What might help is increasing effective_cache_size a lot though, because >> there you might discover the database switching to all new sorts of plan= s >> for some of these queries. =A0But, again, that doesn't impact the situat= ion >> where a sequential scan is the only approach. >> >> I have this whole data set on my PC already and have been trying to find >> time to get it loaded and start my own tests here, it is a quite interes= ting >> set of information. =A0Can you tell me what you had to do in order to ge= t it >> running in PostgreSQL? =A0If you made any customizations there, I'd like= to >> get a copy of them. =A0Would save me some time and help me get to where = I >> could give suggestions out if I had a "pgdumpall --schema-only" dump fro= m >> your database for example, or however you got the schema into there, and= the >> set of PostgreSQL-compatible queries you're using. >> >> By the way: =A0if anybody else wants to join in, here's a script that >> generates a script to download the whole data set: >> >> #!/usr/bin/env python >> for y in range(1988,2010): >> =A0 for m in range(1,13): >> =A0 =A0 =A0 print "wget --limit-rate=3D100k >> http://www.transtats.bts.gov/Download/On_Time_On_Time_Performance_%s_%s.= zip" >> % (y,m) >> >> It's 3.8GB of download that uncompresses into 46GB of CSV data, which is= why >> I put the rate limiter on there--kept it from clogging my entire Interne= t >> connection. >> >> -- >> Greg Smith =A0 =A02ndQuadrant =A0 Baltimore, MD >> PostgreSQL Training, Services and Support >> greg@2ndQuadrant.com =A0www.2ndQuadrant.com >> >> >