Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfzLH-00065I-6f for pgsql-performance@arkaria.postgresql.org; Mon, 11 Nov 2013 21:48:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VfzLG-0008U7-CY for pgsql-performance@arkaria.postgresql.org; Mon, 11 Nov 2013 21:48:18 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfzLF-0008Ty-6P for pgsql-performance@postgresql.org; Mon, 11 Nov 2013 21:48:17 +0000 Received: from exprod5og103.obsmtp.com ([64.18.0.145]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfzLC-00054h-3e for pgsql-performance@postgresql.org; Mon, 11 Nov 2013 21:48:16 +0000 Received: from mail-ie0-f175.google.com ([209.85.223.175]) (using TLSv1) by exprod5ob103.postini.com ([64.18.4.12]) with SMTP ID DSNKUoFQnct/yMg1OXpbZsblXLje8s6qOJo/@postini.com; Mon, 11 Nov 2013 13:48:14 PST Received: by mail-ie0-f175.google.com with SMTP id u16so5102322iet.6 for ; Mon, 11 Nov 2013 13:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enova.com; s=google; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=GYw6/F7GTmkhMD3/dVnzDUuLasyrLAvBYc3UXnV3Mhw=; b=TYagMdXIX9LXgT0NXwQoo4N1YkKasfFPsG0nLiDZQ+qv77yHQbz024BYk6gskL92D5 NhexO8M4ai5U2V75kyYUqcR7vrfzIhORymON9ma9Y0CjID3Y5hYgdJLuo+uspK/NrlvB 0AKB+UPK5Kz594KiAs94TjWpew9Ppy2BCkUkE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=GYw6/F7GTmkhMD3/dVnzDUuLasyrLAvBYc3UXnV3Mhw=; b=PewiCaeNsE/CpfSMw/v+8l+/Q8SezEFHc0o6wYrY5UcSaGhgJzMZKF62lSusow8leC l8nTVbvBHIMOb8XED1OlTmM/vOWAO3UtKo8yeA71N4wgBfST2Hibnnj+PZWdWFOueqLI yqzmNNem4P7Nq0J50AiU6xK2TY7amm4HRnntn5f1eG9nHAfLmxs/Bpu6MmPUaqMYsjc5 0bmDPAXgy+M0dWggvjVBdTipn47pKaUoV2NJsfe/vNLwKcC6MVZa3h0JIHikTdYNu3oV 5qmP65FhaOFOxZ6vQYrti5Wy0UVrfsIIBt+iJfU/PzI573RYrAlT4JwpLBr5yoxeoQwW M6hw== X-Gm-Message-State: ALoCoQlxE/pgaRvYKi0HO3cpELScTKG+r/3H2R2yhudN7sM/JRk3JO37CHLmX7H5iexiyHbbbBAvvLz64vaYQ1aOu5V86K+dcrbXqbDBMeXBES0xvT0yKZVVEPO9jdNzqsqZf/WrTYJ7dv6q2FUZqfXDJV0huVFaAI+W8NitmzY2+Oj75GLOfDAJI1f9ineEEVgLYddcjUWd X-Received: by 10.50.111.110 with SMTP id ih14mr12883320igb.58.1384206493021; Mon, 11 Nov 2013 13:48:13 -0800 (PST) X-Received: by 10.50.111.110 with SMTP id ih14mr12883314igb.58.1384206492939; Mon, 11 Nov 2013 13:48:12 -0800 (PST) Received: from decina.local (rrcs-67-79-71-90.sw.biz.rr.com. [67.79.71.90]) by mx.google.com with ESMTPSA id ka1sm20861166igb.7.2013.11.11.13.48.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Nov 2013 13:48:12 -0800 (PST) Message-ID: <52815099.4080409@enova.com> Date: Mon, 11 Nov 2013 15:48:09 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: "pgsql-performance@postgresql.org" Subject: Horrific time for getting 1 record from an index? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Postgres 9.1.9. explain analyze select min(insert_time) from cnu_stats.page_hits_raw ; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- Result (cost=0.12..0.13 rows=1 width=0) (actual time=257545.835..257545.836 rows=1 loops=1) InitPlan 1 (returns $0) -> Limit (cost=0.00..0.12 rows=1 width=8) (actual time=257545.828..257545.829 rows=1 loops=1) -> Index Scan using page_hits_raw_pkey on page_hits_raw (cost=0.00..5445004.65 rows=47165480 width=8) (actual time=257545.826..257545.826 rows=1 loops=1) Index Cond: (insert_time IS NOT NULL) Total runtime: 257545.881 ms (6 rows) I checked and there were no un-granted locks... but I have a hard time believing it actually too 257 seconds to get 2 pages (one index, one heap) back from our SAN. Am I missing something here? -- Jim Nasby, Lead Data Architect (512) 569-9461 -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance