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 1tfeHy-003yaj-8j for pgsql-es-ayuda@arkaria.postgresql.org; Wed, 05 Feb 2025 12:13:54 +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 1tfeHx-00EB0n-C7 for pgsql-es-ayuda@arkaria.postgresql.org; Wed, 05 Feb 2025 12:13:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfeHx-00EB0f-32 for pgsql-es-ayuda@lists.postgresql.org; Wed, 05 Feb 2025 12:13:53 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tfeHu-003J8r-2j for pgsql-es-ayuda@postgresql.org; Wed, 05 Feb 2025 12:13:52 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id F041211400A5; Wed, 5 Feb 2025 07:13:49 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 05 Feb 2025 07:13:49 -0500 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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1738757629; x=1738844029; bh=P FYClpMtRwTabPfdzus1cs3vINHifk0svTsMlGVX3Eg=; b=Cy0XgLkroNmNCcHfH vcpItfnRZTvCPyWhII4akAq9H/P+lOyDJWiT83rCBOn8IEOhv7QTt9N06wK9Sffx 6OA00o2G96PoLpo0VuVHMIsjCWTq91/lW0kb1lfrCiZb9aocApYF/uiKkM46jgJl evB6btJ/aFzDt8AksQSiLslFoBH2z8BW48kUyhLk+QzD4T5xC36wcO6Cmgy1quHl Zs8UroRtbSPyLU0N68fOxU0T2TIMgFbD8cQ1VY8huB1xer4th4x/1107W9QMRIjx c1DMfrxqXrLVUZxrEUFmlTYQ+YHjTPPYLinHYCFUfJfRYn6SHkb1Bbfpj1Psu601 +pTyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdej necuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedvheeuffehgfeukeeufeeh hefghfeugfefudekjeevudffgeffkeegffffveegheenucffohhmrghinhepvghnthgvrh hprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspg hrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhuihhllhgv rhhmohhvihhlsehgmhgrihhlrdgtohhmpdhrtghpthhtohephhhmihhrrghnuggrsehgmh grihhlrdgtohhmpdhrtghpthhtohepjhhgrhgrthgvrhhonhesghhmrghilhdrtghomhdp rhgtphhtthhopehpghhsqhhlqdgvshdqrgihuhgurgesphhoshhtghhrvghsqhhlrdhorh hg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Feb 2025 07:13:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1738757627; bh=bt8d4L7eb6xZQR27LcIuH04BhSialI5WzqDSbGcW5B4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ddjz9/MZ5DKL/QcdBOkDiAwElQb+VlIrmW6YYpHph1q+rh/iiy2iVImi+iTbVT/86 EYjGvzfmMwiaJjJCcqdqF1em+Nhbwn4lvZwn4LtWyVHJNajVFpgRodMAWiB7kc7wHo WPj8mZmsiahq+yAS/bn49oV/WyNXdcGWorgACDEZpbh+0RA/0FBpZXE2xK4vevEbc1 KyZqMI2SU2m5oeeHqXK8nd1gK+2SuqhylnY4sfpuT9/nBj+gNG8aC5q3ER3gElJUGj ePUm44CUS16vrjpR0HzLbki511AqTZns8v9rp2t08EFNWiKVNakwTaNuKOLzK1Go/s X0FFG1KcQ1Cpw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 97AEB90; Wed, 5 Feb 2025 13:13:47 +0100 (CET) Date: Wed, 5 Feb 2025 13:13:47 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: "Guillermo E. Villanueva" Cc: Horacio Miranda , Jairo =?utf-8?B?R3JhdGVyw7Nu?= , pgsql-es-ayuda Subject: Re: plan de =?utf-8?Q?ejecuci=C3=B3n?= Message-ID: <202502051213.6jo6oofnt24m@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Guillermo E. Villanueva escribió: > Jaja si engaño a pg y cambio la condición > and companies.fulldate::text >= '2025-01-31 09:30' and companies.fulldate:: > text < '2025-02-04 09:30' > > ya no usa el índice secundario, usa el índice de la PK y resuelve la query > en menos de un segundo , lo tengo resuelto así pero me quedo con la duda de > porque el planificador lo hace mal de la otra manera (para mi) Hmm, es raro. ¿Has visto el tamaño de los índices? ¿Qué tienes en effective_cache_size y shared_buffers? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/