X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1FC97DA240 for ; Sat, 15 Oct 2005 11:00:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43802-08 for ; Sat, 15 Oct 2005 14:00:05 +0000 (GMT) Received: from fmf.vtu.lt (fmf.vtu.lt [193.219.145.206]) by svr1.postgresql.org (Postfix) with ESMTP id 7528AD9A99 for ; Sat, 15 Oct 2005 11:00:07 -0300 (ADT) Received: from fmf.vtu.lt (localhost [127.0.0.1]) by fmf.vtu.lt (Postfix) with ESMTP id 359DC18473; Sat, 15 Oct 2005 17:00:09 +0300 (EEST) Received: from 81.7.89.65 (SquirrelMail authenticated user nso) by fmf.vtu.lt with HTTP; Sat, 15 Oct 2005 17:00:09 +0300 (EEST) Message-ID: <17363.81.7.89.65.1129384809.squirrel@fmf.vtu.lt> In-Reply-To: References: <17260.81.7.89.65.1129382454.squirrel@fmf.vtu.lt> Date: Sat, 15 Oct 2005 17:00:09 +0300 (EEST) Subject: Re: Bytea poor performance From: "NSO" To: "Sean Davis" Cc: pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-VGTU-MailScanner-OpenProtect-Information: Please contact the ISP for more information X-VGTU-MailScanner-OpenProtect: Found to be clean X-MailScanner-OpenProtect-MCPCheck: X-MailScanner-OpenProtect-From: nso@fmf.vtu.lt X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.267 required=5 tests=[AWL=-0.107, DNS_FROM_RFC_ABUSE=0.374] X-Spam-Level: X-Archive-Number: 200510/240 X-Sequence-Number: 15008 Hello, How about some explain analyze output? Explain analyse select * from files where nr > 1450 "Index Scan using pk on files (cost=0.00..3.67 rows=50 width=36) (actual time=0.000..0.000 rows=50 loops=1)" Have you done a full vacuum lately? How about reindexing? Yes, I did reindexing and vacuum full just before query.. > On 10/15/05 9:20 AM, "NSO" wrote: > >> Hello, >> >> I am trying to select form table with bytea field. And queries runs very >> slow. >> My table: >> CREATE TABLE files (file bytea, nr serial NOT NULL) WITH OIDS; >> >> Query: >> select * from files where nr > 1450 >> >> (I have total 1500 records in it, every holds picture of 23kB size) >> Query runs very long: >> Total query runtime: 23625 ms. >> Data retrieval runtime: 266 ms. >> 50 rows retrieved. >> >> explain: >> Index Scan using pk on files (cost=0.00..3.67 rows=50 width=36) >> Index Cond: (nr > 1450) >> >> Is it possible to do something with it? or it is normal? Our server is >> fast, and all other tables work fine.. > > How about some explain analyze output? Have you done a full vacuum > lately? > How about reindexing? > > Sean > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > > -- > This message has been scanned for viruses and > dangerous content, and is believed to be clean. > > -- This message has been scanned for viruses and dangerous content, and is believed to be clean.