Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkeu6-0001Rs-Nq for pgsql-performance@arkaria.postgresql.org; Wed, 23 Aug 2017 23:17:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dkeu6-00036T-AP for pgsql-performance@arkaria.postgresql.org; Wed, 23 Aug 2017 23:17:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dkesI-0006a5-Ew for pgsql-performance@postgresql.org; Wed, 23 Aug 2017 23:15:50 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dkesF-0000vP-5g for pgsql-performance@postgresql.org; Wed, 23 Aug 2017 23:15:50 +0000 Received: by mail-io0-x230.google.com with SMTP id g135so5515229iog.1 for ; Wed, 23 Aug 2017 16:15:46 -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=Guek9wlnqG1zTwVLRTE3PHwUKStuQx/M0bItxmo3bPw=; b=PZuikOPFZmpTGRzSPjm+7tX6KDYU3phBdJC8JtwV7lGYmZe+WK0HsW3oB+bWa34rQq BZNXOckFwqzTZV91QQGMm07+75Bv6gKKBBwEx4dn11fFO2RNzIZ6yXLiwam9l0a01dvN Gul5kKIQEvnZeCUqyK92biltItmQeApq2v71w7SrOKHz1UvyH+CTm7nrG2YgmOMtNRF6 WpQsYsKMjHvI3znEpNTvxGvJlNiECImhlj0tz+k2KjuROm2EPEkAD++DCDUZ+up6i/7T lCCG4pBjKVqAVcfSjLQRyQIACKnsCZVjY9dTk6ceObNvq/dj7J2OhqNuvBEUw7NLMpiJ KWdw== 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=Guek9wlnqG1zTwVLRTE3PHwUKStuQx/M0bItxmo3bPw=; b=iUthoFCMzfPTCTpbXsELtJiqXqILN52p7/FQSSpo6stYWXMrWH0IKgcP8tUmDO4ois 74c9rJqZUOLmBGkgAkzLHzvUc//scGO/ipU3S87P57/jCiWpI98F+nBwhikXds8+97Lp AKszOtPoJnZ9BzH4aO4cX3EP2Qzr0lJ6r2qWLLRkXsaE25exUVTEbHdn7e+FKYt58v7U OmLiROywvt0e0eBZj6mBHoVYynsidDGoQEnS1WNTdCgzpce0VVym3jqmcFuxtFwJAV/P lKtxCetC4lB24X7YSkwDoMiYKgu9cW7tItB0kzed7zcNDxHbyQl2/nqCjvtBazQOuGk6 60xw== X-Gm-Message-State: AHYfb5hu1pGuZiSr8rDuSG3v9+Jja2r/Xi/ytQ1Q6NbJMGvnnAnbeO47 1P/ReSmWZ5T4eRyy/bJTi+okKP10/w== X-Received: by 10.107.169.85 with SMTP id s82mr3966007ioe.209.1503530145373; Wed, 23 Aug 2017 16:15:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.40.213 with HTTP; Wed, 23 Aug 2017 16:15:44 -0700 (PDT) In-Reply-To: References: <88350892-C4AB-4191-9F8E-DB7CFA81F6C6@gmail.com> <00990FBB-D288-4878-8B8E-36E24F808F2C@gmail.com> From: Claudio Freire Date: Wed, 23 Aug 2017 20:15:44 -0300 Message-ID: Subject: Re: performance problem on big tables To: Mariel Cherkassky Cc: "pgsql-performance@postgresql.org" 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, Aug 21, 2017 at 5:00 AM, Mariel Cherkassky wrote: > To summarize, I still have performance problems. My current situation : > > I'm trying to copy the data of many tables in the oracle database into my > postgresql tables. I'm doing so by running insert into local_postgresql_temp > select * from remote_oracle_table. The performance of this operation are > very slow and I tried to check the reason for that and mybe choose a > different alternative. > > 1)First method - Insert into local_postgresql_table select * from > remote_oracle_table this generated total disk write of 7 M/s and actual disk > write of 4 M/s(iotop). For 32G table it took me 2 hours and 30 minutes. > > 2)second method - copy (select * from oracle_remote_table) to /tmp/dump > generates total disk write of 4 M/s and actuval disk write of 100 K/s. The > copy utility suppose to be very fast but it seems very slow. Have you tried increasing the prefetch option in the remote table? If you left it in its default, latency could be hurting your ability to saturate the network. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance