Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5abu-0003M1-K0 for pgsql-admin@arkaria.postgresql.org; Fri, 20 Oct 2017 16:57:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e5abu-0007J4-6Z for pgsql-admin@arkaria.postgresql.org; Fri, 20 Oct 2017 16:57:26 +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 1e5aa5-000441-RV for pgsql-admin@postgresql.org; Fri, 20 Oct 2017 16:55:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e5aZy-0002pj-Pc for pgsql-admin@postgresql.org; Fri, 20 Oct 2017 16:55:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v9KGtMH2004751; Fri, 20 Oct 2017 12:55:22 -0400 From: Tom Lane To: Cory Nemelka cc: Aldo Sarmiento , pgsql-admin@postgresql.org Subject: Re: Processing very large TEXT columns (300MB+) using C/libpq In-reply-to: References: Comments: In-reply-to Cory Nemelka message dated "Fri, 20 Oct 2017 09:14:48 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4749.1508518522.1@sss.pgh.pa.us> Date: Fri, 20 Oct 2017 12:55:22 -0400 Message-ID: <4750.1508518522@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Cory Nemelka writes: > Yes, but I should be able to read them much faster. The psql client can > display an 11MB column in a little over a minute, while in C using libpg > library, it takes over an hour. Well, of course psql relies on libpq, so it seems unlikely that libpq itself is where the time is going. Have you tried applying a profiler? "perf" or "oprofile" or similar tool ought to pinpoint the culprit pretty easily. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin