X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 29DD83A3B60 for ; Sun, 24 Oct 2004 20:11:52 +0100 (BST) 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 02189-07 for ; Sun, 24 Oct 2004 19:11:16 +0000 (GMT) Received: from server07.icaen.uiowa.edu (server07.icaen.uiowa.edu [128.255.17.47]) by svr1.postgresql.org (Postfix) with ESMTP id 4FDFE3A2BE5 for ; Sun, 24 Oct 2004 20:11:43 +0100 (BST) Received: from server11.icaen.uiowa.edu (server11.icaen.uiowa.edu [128.255.17.51]) by server07.icaen.uiowa.edu (8.12.9/8.12.9) with ESMTP id i9OJBlMq027779; (envelope-from ) Sun, 24 Oct 2004 14:11:47 -0500 (CDT) Received: from [192.168.1.11] (12-217-241-0.client.mchsi.com [12.217.241.0]) by server11.icaen.uiowa.edu (8.12.9/smtp-service-1.6) with ESMTP id i9OJBkBN028623; (envelope-from ) Sun, 24 Oct 2004 14:11:46 -0500 (CDT) Message-ID: <417BFE75.4060006@johnmeinel.com> Date: Sun, 24 Oct 2004 14:11:49 -0500 From: John Meinel User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rod Dutton , pgsql-performance@postgresql.org Subject: Re: Queries slow using stored procedures References: <20041024184536.2A841406474@mra02.ex.eclipse.net.uk> In-Reply-To: <20041024184536.2A841406474@mra02.ex.eclipse.net.uk> X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6ACE2FD04CAD41D0F1154357" X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.66n X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.75 on clamav.icaen.uiowa.edu X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/398 X-Sequence-Number: 8874 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6ACE2FD04CAD41D0F1154357 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Rod Dutton wrote: > I also should add that the sp is only slow when the table is big (probably > obvious!). > > Rod Sure, the problem is it is switching to a sequential search, with a lot of rows, versus doing an indexed search. It's all about trying to figure out how to fix that, especially for any value of botnum. I would have hoped that using LIMIT 1 would have fixed that. John =:-> --------------enig6ACE2FD04CAD41D0F1154357 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBe/51JdeBCYSNAAMRAj40AKCgWYbCednkxAXUfYYCAaThoxftIACgh7PB x3Wkj4EmZzqicQtMgFgRaAc= =5AfW -----END PGP SIGNATURE----- --------------enig6ACE2FD04CAD41D0F1154357--