Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elIKW-0001NS-9d for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Feb 2018 17:55:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elIKU-0006BJ-Lt for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Feb 2018 17:55:50 +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 1elIKU-0006B9-D3 for pgsql-bugs@lists.postgresql.org; Mon, 12 Feb 2018 17:55:50 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1elIKN-0003dj-9s for pgsql-bugs@postgresql.org; Mon, 12 Feb 2018 17:55:48 +0000 Received: by mail-wm0-x241.google.com with SMTP id f3so11558739wmc.1 for ; Mon, 12 Feb 2018 09:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=i5ghYWebIfIcqYxTuRVxaeIVbdC3ZGEWVdrYBfK+q1Q=; b=F/JzDLEcgJCJK60Ilz5NWuqrt+7TjEzqoyBhQ1SxvYcBjjkoO3rjhroLhiG1zNv1OM SdJ5FcRONkfdDJprE+sjglwN6qQmRJFuBKnxKydjBu6jiiiqg+NCJc3aeOdKJKLgqSz4 fNgIES6ntWQRYtpnys1OX4oc8MdyunrfWpE9cmtyUi5ZUFxv3vDA1PPz3CD3UKxb/ADH YigZVFFbnF9HvZb3vYd+KeAymSzURWKhiS5kSa0iij9F8xNOOxNglkkaLO58S87A5r8b utev4lHMm4tqwfIJTqlbcfW1i7nHeeQPDTgopuGiLCuEBK3//oINL8Dx7IuUvxPK5oYD XssA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=i5ghYWebIfIcqYxTuRVxaeIVbdC3ZGEWVdrYBfK+q1Q=; b=OLG/O52WiDM9cHx2C7eBmvK3UMNuvWltGR/ZG3ONoq3qxpdLSOkYQA5g9C8NOP3dgO rUg1uWxxtq6tgg1vFnPv+tiI76zIWUMQVGd34L0vSGwVMYAPhi/RZaGdRwh42CQO0fgc GwROuBUm3m3DP12YGVIGwoGu+VJudM7epKSqOSdktgPu5EumxJtUCWTSuJO4K1rpEw62 Rezb+x6h7nIZyQQkzmqYsZpTlBsUGsYWa19wYDfwzAlIL1BkI8pyGtkLuRP45CbMzF8m Tcf7h9RnzW8WzxTScnRMpJQXuHrO5xp1nA/mzMMnMDlRfS/7gl9dO0ZcS56mOknrnPGe l9HA== X-Gm-Message-State: APf1xPDKBHsjBMycHq/bFOaHKdLJOmh6pow+nMnKvUbIbSh6NCohDw9E ImFKSu6seGQKtxQNIdkaEvFj0D9YKXkld3aoKxOfp+7SaJ8h+D4OOqDpulWxoxvzbwtblfbMr4z G5zC2dkAqPGD5NCLvbp+cWj4BLQRWutS3cApR8DEnnvyVYs8FRDfl/MP9k8UoYREhP3YWtnqBo5 grp+nU X-Google-Smtp-Source: AH8x225ZEzjIYUGAIEiDjISliBvjOtGx/SjtwZLth2XPaXeacPJqty4x1JDll8nWnwdppjh5xqECDg== X-Received: by 10.28.11.70 with SMTP id 67mr3866237wml.158.1518458141299; Mon, 12 Feb 2018 09:55:41 -0800 (PST) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id c143sm6359062wmd.48.2018.02.12.09.55.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 09:55:40 -0800 (PST) Subject: Re: Fwd: postgresql performance question To: =?UTF-8?B?6Kix6ICA5b2w?= , pgsql-bugs@postgresql.org References: From: Tomas Vondra Message-ID: <3f3e6ce4-96ac-5608-3aef-02ded0ccaa8e@2ndquadrant.com> Date: Mon, 12 Feb 2018 18:55:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 02/11/2018 04:15 PM, 許耀彰 wrote: > Dear Support Team,  > I create a table by command as listed as below: > *CREATE TABLE public.log2* > *(* > *        d3 text COLLATE pg_catalog."default"* > *)* > *WITH (* > * > * > *    OIDS = FALSE* > * > * > *)* > * > * > *TABLESPACE pg_default;* > > And then use command as listed as below to import data to log2 table > > *COPY log2 FROM '/home/anderson/0107.csv' CSV HEADER;* > > My purpose is to import log information to log2 table to analysis, but I > found one situation : for example , I have 166856 records in log2 table, > when I use select command to list data , it spent a lot time, can we > adjust the situation ?  > *select * from log2 * > Thanks for your kindly assistance. Sorry for being annoying, but this mailing list is for bug reports, and your post is clearly not one. Please, send it to pgsql-performance, more people are watching that list and you're more likely to get help. Furthermore, I strongly recommend reading this: https://wiki.postgresql.org/wiki/Slow_Query_Questions It may actually have answer to your question, and in case it does not it lists things you need to include in your post. For example query plan or information about the hardware/system would be very helpful. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services