Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8nsC-0005Q7-G7 for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 15:52:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8nsA-00045O-Tk for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 15:52:34 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8nsA-00045H-H3 for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 15:52:34 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8ns6-0004WN-HO for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 15:52:34 +0000 Received: by mail-oi1-x241.google.com with SMTP id o205so3006247oib.12 for ; Fri, 13 Sep 2019 08:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=L9edML4uhSDFt2pB71/m8w5dtpCUCtxonXEnzRiIXyU=; b=QPxgDUSif/0Vvy+WrjLnEKB0Fp0TScGYIiNCapD1oD9Uf5Ds9Mgf09A5FZ/WdNeaWH upNjUl07Rd3ENYAb55TaGwdoYyRdWQptVQPb11Guu3FMUVc+LWsJ1OQ/3sIqvxaB+9Ol 5Si2ts6wOOLpTEoUsQk26/t38Wu2cYzEUbsVwmpI/mn0Z8EEQicAb4K00dRAH2NIKghG U3i9TYQDLR8lLgOrPgu1q5naMcPuKy17zPFoVtITaIfKLO9hdm5w0ClFpJOZp7WiOm5l 5HeZnPNMY/Vj8JhI4IxgZKIJJNF7tDEuMD1GlkwgujTJttUPYticw1htxxD9Fdc7w5Zn a4jA== 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-transfer-encoding :content-language; bh=L9edML4uhSDFt2pB71/m8w5dtpCUCtxonXEnzRiIXyU=; b=nk7LrhC7AiJQ1Z4cxXwvdUSS322xGZDBb1pJuo6BVtyhZ4mS2kazj0BOKFGYDV4aB+ JVctzGGRQPIGTEJ3e978Fa6iGfDhanx4yTduJpxlPB5kbr0qN1stygH4jXBz/nH26mPo vtPSZUQcptE3N5ZUmZ8/fQXXQ5j+35wQHJLxxXwWBMWZ6/3mRYXOX92bZmvvyBnq983h 82V7jYHXXkaAH1Z7bxDAF9ZifOT2i53j4xDxM9ZDdiGqpN7VxazWGRU9QmGfPwYd61Sn 4q2i0g2Tye/0SRU+RiiUvDJgvL0R+wce5FCBsqxeyyC5m9d68PCPRE1/qmvuKB0ERcZ/ emLw== X-Gm-Message-State: APjAAAWsfOD74kENauKHyOeaCG/t2418p/W/oyRx3VBjKLdRqZIOgDt4 aixIFPfF+/8J5kmRrA6LfU1nuZsQWfM+zQ== X-Google-Smtp-Source: APXvYqwM55eMR7VMwNMiGpq0REHhN/O+DN5GCHsl82+3a+nHdACwoMdJLJwBLd1ZIWzTz6ExJEZXlw== X-Received: by 2002:aca:598b:: with SMTP id n133mr4092193oib.170.1568389541299; Fri, 13 Sep 2019 08:45:41 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id j20sm1000487oie.55.2019.09.13.08.45.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Sep 2019 08:45:40 -0700 (PDT) Subject: Re: No primary key table To: pgsql-general@lists.postgresql.org References: <901B71E4-A06F-448B-A8B4-056558EBDAF5@gmail.com> From: Ron Message-ID: <76c2bb56-e81b-9086-433a-8ee5a35d72f2@gmail.com> Date: Fri, 13 Sep 2019 10:45:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <901B71E4-A06F-448B-A8B4-056558EBDAF5@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/13/19 10:34 AM, Ertan Küçükoglu wrote: > Hello, > > We are using PostgreSQL 10.0 on a Windows VM. > > There is one database in that server. > There are several tables that will be used for data warehouse purposes. > > There are daily inserts and relatively heavy bulk (whole month data at once) reads at end of months. Reads will be from several hundred clients and will be over internet and no local network connection. > > Daily data saving application check for duplicate entries of a single record using an sql before each insert. That is only select statement during in month days. > > End of the month queries will be selecting bulk data from previous month records and will filter on GUID field and a varchar(25) field. > > There is one primary key of a bigint identity column on each table. Primary key won't be used for any purpose for any queries. > > We wonder if it maybe a suggested to remove primary key index and column. There is no unique key index on these tables otherwise. Don't you need an index to "check for duplicate entries of a single record using an sql before each insert"? -- Angular momentum makes the world go 'round.