Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aLKOE-0003DI-PM for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Jan 2016 00:43:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aLKOE-0004Al-Bl for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Jan 2016 00:43:18 +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_SHA384:256) (Exim 4.84) (envelope-from ) id 1aKQKV-00037Q-Lx for pgsql-bugs@postgresql.org; Sat, 16 Jan 2016 12:51:43 +0000 Received: from bst01.sputnikmedia.net ([193.239.68.121]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aKQKR-0006RE-MS for pgsql-bugs@postgresql.org; Sat, 16 Jan 2016 12:51:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bigmir.net; s=mail; h=Message-Id:Content-Transfer-Encoding:Content-Type:References:MIME-Version:Date:In-Reply-To:Cc:From:Subject:To; bh=azZR1rw7H6aewaGrN1SeVrT9U9GaKB+xeFFhHfx6sZ8=; b=tYqXr87rBCGinxmkLI/rtM6psAtxSkCPKeG/hbgJ75IjZKmG7pnWryNyfwy18kgRHicX1Ozb5sTArpz/xhJjiK735Fp7ZNe9xCIT4PgD6epm4VGbP5qUGiZFI6oGqjvqyDNeI1K+P9/I9kTBSzAhuzK/Ev5cCqFXUEWe4zP3L9A=; Received: from web by bst01.sputnikmedia.net with local (Exim 4.80.1) (envelope-from ) id 1aKQKO-0004go-Qh; Sat, 16 Jan 2016 14:51:36 +0200 To: David G. Johnston Subject: =?windows-1251?B?UmVbMl06IFtCVUdTXSBCVUcgIzEzODY5OiBSaWdodCBKb2luIHF1ZXJ5IHRoYXQgbmV2ZXIgZW5kcw==?= From: Master ZX Cc: =?windows-1251?B?cGdzcWwtYnVnc0Bwb3N0Z3Jlc3FsLm9yZw==?= In-Reply-To: Date: Sat, 16 Jan 2016 14:51:36 +0200 MIME-Version: 1.0 References: <20160115151648.2968.21248@wrigleys.postgresql.org> X-Mailer: bigmir)net Mail System X-Server: bst01.sputnikmedia.net X-Sender-IP: 46.53.178.30 X-User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Message-Id: X-Pg-Spam-Score: 0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Greetings. I can do more to investigate this behavior only if postgresql will consider my claim as bug that has to be fixed in first order. Ideally I should give my DB schema and dump or VM wich reproduces this bug, but I can not give away our internal data. All other options I can not describe at public mailing list. > So, typically the first thing to do is run "EXPLAIN" Explain Analyze do not return any result as select query. So this is just an explain output HashAggregate (cost=962.11..962.12 rows=1 width=70) Group Key: ko_r.id, resellers.name, res.email, resellers.id -> Nested Loop (cost=23.76..962.09 rows=1 width=70) -> Nested Loop Left Join (cost=23.49..957.79 rows=1 width=49) -> Bitmap Heap Scan on ka_object resellers (cost=3.59..212.91 rows=1 width=25) Recheck Cond: (parent_id = 4) Filter: (((type)::text = 'com.plesk.ka.sys.Reseller'::text) AND (system = 'f'::bpchar) AND (upper((name)::text) !~~ '%TEST%'::text)) -> Bitmap Index Scan on ka_object_parent_id_idx (cost=0.00..3.59 rows=174 width=0) Index Cond: (parent_id = 4) -> Nested Loop Left Join (cost=19.90..744.87 rows=1 width=24) -> Nested Loop Left Join (cost=19.61..744.46 rows=1 width=32) -> Nested Loop (cost=19.32..743.97 rows=1 width=40) -> Nested Loop (cost=19.05..743.67 rows=1 width=72) -> Nested Loop (cost=18.77..743.36 rows=1 width=48) Join Filter: (ko_r.id = ko_clc.parent_id) -> Nested Loop (cost=18.49..742.99 rows=1 width=64) -> Nested Loop (cost=18.21..742.69 rows=1 width=56) -> Nested Loop (cost=0.56..4.61 rows=1 width=16) -> Index Only Scan using ka_object_pkey on ka_object ko_r (cost=0.29..4.30 rows=1 width=8) Index Cond: (id = resellers.id) -> Index Only Scan using ka_user_pkey on ka_user kus (cost=0.28..0.29 rows=1 width=8) Index Cond: (id = ko_r.id) -> Nested Loop (cost=17.65..737.81 rows=27 width=40) Join Filter: (ko_key.parent_id = keys_c.id) -> Merge Join (cost=17.37..711.31 rows=85 width=56) Merge Cond: (ko_type.id = k.type_id) Join Filter: (ko_key.id = k.id) -> Nested Loop (cost=0.99..1543.85 rows=768 width=64) -> Nested Loop (cost=0.42..40.77 rows=8 width=16) -> Index Only Scan using key_type_pkey on key_type kt (cost=0.13..6.25 rows =8 width=8) -> Index Only Scan using ka_object_pkey on ka_object ko_type (cost=0.29..4. 30 rows=1 width=8) Index Cond: (id = kt.id) -> Materialize (cost=0.57..1493.72 rows=96 width=48) -> Nested Loop (cost=0.57..1493.24 rows=96 width=48) -> Nested Loop (cost=0.29..1458.21 rows=96 width=32) -> Seq Scan on ka_object ko_key (cost=0.00..1149.97 rows=96 wid th=16) Filter: ((system = 'f'::bpchar) AND ((create_date)::date >= date_trunc('month'::text, (now() + '-1 mons'::interval))) AND ((create_date)::date < date_trunc('month'::text, (now() + '00:00:00'::interval)))) -> Index Scan using ka_object_pkey on ka_object ko_c (cost=0.29 ..3.20 rows=1 width=16) Index Cond: (id = ko_key.parent_id) -> Index Scan using ka_object_pkey on ka_object ko_cl (cost=0.29..0.3 5 rows=1 width=16) Index Cond: (id = ko_c.parent_id) -> Index Scan using key_type_id_idx on key k (cost=0.29..602.90 rows=17049 width=16) -> Index Scan using container_pkey on container keys_c (cost=0.28..0.30 rows=1 width=8) Index Cond: (id = ko_c.id) Filter: ((store_type)::text = 'Key'::text) -> Index Only Scan using client_pkey on client (cost=0.27..0.29 rows=1 width=8) Index Cond: (id = ko_c.parent_id) -> Index Scan using ka_object_pkey on ka_object ko_clc (cost=0.29..0.35 rows=1 width=16) Index Cond: (id = ko_cl.parent_id) -> Index Scan using base_client_pkey on base_client bc (cost=0.28..0.30 rows=1 width=24) Index Cond: (id = ko_c.parent_id) Filter: (upper((company_name)::text) !~~ '%TEST%'::text) -> Index Only Scan using ka_user_pkey on ka_user ku (cost=0.28..0.29 rows=1 width=8) Index Cond: (id = ko_c.parent_id) -> Nested Loop (cost=0.28..0.48 rows=1 width=8) -> Index Only Scan using key_property_reference_keytype_id_property_id_unique_idx on key_property_reference kpr (cost=0.14. .0.16 rows=1 width=16) Index Cond: (keytype_id = ko_type.id) -> Index Scan using key_property_pkey on key_property kp (cost=0.14..0.31 rows=1 width=8) Index Cond: (id = kpr.property_id) Filter: (((name)::text = 'server_license_details'::text) AND ((value)::text = 'billing'::text)) -> Index Only Scan using key_value_key_id_and_kvk_id_idx on key_value exp_date (cost=0.29..0.39 rows=1 width=8) Index Cond: ((key_id = k.id) AND (key_value_key_id = 63)) -> Index Scan using ka_user_pkey on ka_user res (cost=0.28..4.29 rows=1 width=29) Index Cond: (id = resellers.id) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs