Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbmVa-0007hv-J4 for pgsql-admin@arkaria.postgresql.org; Thu, 21 May 2020 14:49:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbmVZ-00047T-Bo for pgsql-admin@arkaria.postgresql.org; Thu, 21 May 2020 14:49:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbmS1-0003os-Ml; Thu, 21 May 2020 14:45:37 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbmRu-0000ST-85; Thu, 21 May 2020 14:45:36 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8AF8ADC3; Thu, 21 May 2020 10:45:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 21 May 2020 10:45:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=D iasCSl+j1RJ0VwwYWSyjURxxbp1J5NpjoSdSUZpw/A=; b=KO6OT9eFAwlnxnNhH nLHc86t9ZTga1xtiMBYokppGPw/BEVfwr6zx5QjGdRaKfmzy/MljnZVtBTkhMQXg n+PBzC4ETYGUAH9U0CyZkQbq4EwR1UmGH6mIfY5RwMkD79/IHGM6HcavravuPRY+ SrvXRVXY8M04NknDOEh4yavEE43TW6zsUKsdR4wi+doQBCMUY/ZltXKNMQ+Qgxuh +jliTq1lcESh9nvAmuQdFvzoqXrF+k0qJ+JXvKIuLasSfmvrZR6FUenepaasjkFX Dqdz2ssgH0R863LNPNcN6LPv/bCZWdGGErGiclTQHapWfxbd/SgB1BFxGKDCMA/L zMICg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=DiasCSl+j1RJ0VwwYWSyjURxxbp1J5NpjoSdSUZpw /A=; b=bi9yETk13ZZ17uzHyL/Ayqa9qGxuEpUoR2czNlHqrYBm2raIUEM/6mfCF 6VVcJeA8Hs074dtGQKHZcO3C8M9xRSv/2DFmxlv1T9UaPtW+/t0cSBqjPa4ZOSkb Zr1mUSvj4rVLb4wokqqBIliH+pz9qpQdPG5YgDKJi1/N8pwRVv7XFmkGi3YTPvyp 0lqK84xH1cKHPkGCfYQcIB6Jc5gmp30Yx26IaLIAzc6rxpF2hJXdCirClFWm5ZB/ 0Zwn4zP3kanropOjGTx5eIufwNfHAGA8w45wc/TSQNDHmYjEXMw3PeYrZtgQ/UgC uywb25tVVJZdgHgsZkjENPjTPv5Yw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduuddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevveefveefueegffekkefhgeeiueffgfetueejvdfg hfeujeejhfekjeelgedtgeenucfkphepjeehrddujedvrdehrddvfedunecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 52E37306647D; Thu, 21 May 2020 10:45:27 -0400 (EDT) Subject: Re: Suggestion on index creation for TEXT data field To: postgann2020 s , pgsql-admin@postgresql.org, pgsql-general@postgresql.org, pgsql-performance@postgresql.org References: From: Adrian Klaver Message-ID: Date: Thu, 21 May 2020 07:45:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/21/20 7:27 AM, postgann2020 s wrote: > Hi Team, > Thanks for your support. > Could you please suggest on below query. > > Environment > > PostgreSQL: 9.5.15 > Postgis: 2.2.7 > Mostly table contains GIS data and we are trying to creating an index on > the column which is having an avg width of 149bytes. > >  CREATE INDEX index_idx >   ON SCHEMA.TABLE >   USING btree >   (column); > > ERROR:  index row size 2976 exceeds maximum 2712 for index "index_idx" > HINT:  Values larger than 1/3 of a buffer page cannot be indexed. > Consider a function index of an MD5 hash of the value, or use full-text > indexing.^^^^^^^^^^^^^^^^^^^^^^ Hint supplies answer to 1) and 2) below. > > Could you please suggest on below queries. > 1. How to solve the issue?. > 2. What type of index is the best suited for this type of data?. > > Thanks for your support. > > Regards, > PostgAnn. -- Adrian Klaver adrian.klaver@aklaver.com