Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmy9d-00Au5u-9Q for pgsql-general@arkaria.postgresql.org; Wed, 20 Mar 2024 15:47:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rmy9b-0064hQ-PJ for pgsql-general@arkaria.postgresql.org; Wed, 20 Mar 2024 15:47:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmy9b-0064gH-Dv for pgsql-general@lists.postgresql.org; Wed, 20 Mar 2024 15:46:59 +0000 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmy9Y-005ZJ6-VB for pgsql-general@lists.postgresql.org; Wed, 20 Mar 2024 15:46:59 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 92BF91140117; Wed, 20 Mar 2024 11:46:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 20 Mar 2024 11:46:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1710949615; x=1711036015; bh=KRqya+G67iX9agrZcDNFg98OlCYNdTSs3JGAEOSUlWY=; b= cFwUMkcVcMawdhkYVNuJfU0hWQZxCFVMfdZPw7tSWd8v8bMv115HHhFwjFH7XbhO zETRmr/okUiIok8cRfjrjvLPdgDponY53XahICTofYf68fFGscUIahnGHLf/ZdQC Or/0UW5xjmf2owE2VINqLTs9t0mBMVftQGafaHN5+8fJ/LMn3LNxiun410BGEnbG NNR7gXApYEIEXSHzPbiy4pCCqLf8YdKJ/PU8wSH7uR9ejrqbGJspf2rnzf7JNKpH G8HmmGLwsH7NZ3SuBnrLZb28v6vKI3ZnbO6+7upgTnsa1bX3tX6blBfnGwFNZO7i bfB4eLq4BZHSsKfA3lGlsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1710949615; x= 1711036015; bh=KRqya+G67iX9agrZcDNFg98OlCYNdTSs3JGAEOSUlWY=; b=c jMbh84fMKLCrgtTHUdUYJalmjJGqSE4r0o58SXiwjApi5tJhmLO8X7Bv2ot/2EtP JmY5zJT5qeNDSvcArs0Dr83OTVV44oLG1j+B/bS2ICAzbzl0q8vj7z0UOT/0ND30 R1EwhPB+RfMeUhTbi0ehvmperxs1MRwybkmbw2yWeMHVf+oXelElGKNOnbQR8LFQ UZwu97mmVG/nLhL7D958Hs209qLvuBPN4tvisrWAwQEgAFchf8l5mPBoOpPjoSvB iEVbwF+Kv+1fZfsxDVovVFk0HERrz3r7mVfDGtln6elVehJSRP/Wi0LJsty3axGb KS/sq4wPit5zipRUxm8XA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrleeggdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpefhveeihfevlefffedthedukeevfefhfedtgeeifeev teffgfefhedtffetudettdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Mar 2024 11:46:54 -0400 (EDT) Message-ID: <5b2ebf67-df3b-4b94-8a27-74d20d28f014@aklaver.com> Date: Wed, 20 Mar 2024 08:46:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Dropping a temporary view? Content-Language: en-US To: Celia McInnis , Erik Wienhold Cc: "pgsql-generallists.postgresql.org" References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/20/24 08:39, Celia McInnis wrote: > Ok, thanks - so I guess that means that if there is both a temporary and > a non temporary view called "tempvie", > > DROP VIEW tempview; > > will remove the 1st tempview found, which with my path is the temporary > one. Is there some reason why it then took 7 minutes to select from the > non-temporary view tempview after I dropped the temporary view tempview? > > I have sometimes had some very long query times when running query > software, and maybe they are resulting from my switching between > temporary and non-temporary views of the same name while debugging. If > so, is there something I should be doing to clean up any temporary > messes I am creating? What is the purpose of the temp view over the the regular view process? How do they differ in data? Is all the above happening in one session? Have you run EXPLAIN ANALYZE on the select from the regular view? > > Thanks, > Celia McInnis > -- Adrian Klaver adrian.klaver@aklaver.com