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 D25135662F for ; Sun, 13 Mar 2005 19:51:03 +0000 (GMT) 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 13871-10 for ; Sun, 13 Mar 2005 19:50:59 +0000 (GMT) Received: from sranda.klamovka.kosire.czf (unknown [82.113.63.66]) by svr1.postgresql.org (Postfix) with ESMTP id 792FB565E9 for ; Sun, 13 Mar 2005 19:50:58 +0000 (GMT) Received: (qmail 17102 invoked from network); 13 Mar 2005 20:50:58 +0100 Received: from fordfrog.klamovka.kosire.czf (HELO ?192.168.11.101?) (10.15.70.18) by mail.klamovka.kosire.czf with AES256-SHA encrypted SMTP; 13 Mar 2005 20:50:58 +0100 Message-ID: <423499A9.5080504@startnet.cz> Date: Sun, 13 Mar 2005 20:51:05 +0100 From: =?ISO-8859-2?Q?Miroslav_=A9ulc?= Organization: StartNet s.r.o. User-Agent: Mozilla Thunderbird 1.0 (X11/20041208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Arbash Meinel Cc: PGSQL mailing list Subject: Re: How to read query plan References: <42345D24.8070104@startnet.cz> <4234692E.3050802@arbash-meinel.com> <42347407.2000202@startnet.cz> <42347D5E.9000900@arbash-meinel.com> <42348F54.1000408@startnet.cz> <423493E5.6040203@arbash-meinel.com> In-Reply-To: <423493E5.6040203@arbash-meinel.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040805050708000200020000" X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200503/229 X-Sequence-Number: 10934 This is a multi-part message in MIME format. --------------040805050708000200020000 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit John Arbash Meinel wrote: > Is there a reason to use varchar(1) instead of char(1). There probably > is 0 performance difference, I'm just curious. No, not at all. I'm just not used to char(). > Well, with cursors you can also do "FETCH ABSOLUTE 1 FROM > ", which sets the cursor position, and then you can "FETCH > FORWARD 30". > I honestly don't know how the performance will be, but it is something > that you could try. This is science for me at this moment :-) >> For display of single page consisting of 30 rows. The reason I query >> all rows is that this is one of the filters users can use. User can >> display just bigboards or billboards (or specify more advanced >> filters) but he/she can also display AdDevices without any filter >> (page by page). Before I select the 30 row, I need to order them by a >> key and after that select the records, so this is also the reason why >> to ask for all rows. The key for sorting might be different for each >> run. >> > How are you caching the information in the background in order to > support paging? Since you aren't using limit/offset, and you don't seem > to be creating a temporary table, I assume you have a layer inbetween > the web server and the database (or possibly inside the webserver) which > keeps track of current session information. Is that true? I just need three information: 1) used filter (stored in session, identified by filter index in query string) 2) page length (static predefined) 3) what page to display (in query string) >> In fact, on MySQL I didn't see any slow reactions so I didn't measure >> and inspect it. But I can try it if I figure out how to copy the >> database from PostgreSQL to MySQL. > > > I figured you still had a copy of the MySQL around to compare to. You > probably don't need to spend too much time on it yet. It's not so simple because there are some differences between MySQL and PostgreSQL in how they handle case sensitivity etc. The database table structures are not the same too because of different data types support and data values support. > > John > =:-> Miroslav --------------040805050708000200020000 Content-Type: text/x-vcard; charset=utf-8; name="miroslav.sulc.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="miroslav.sulc.vcf" begin:vcard fn;quoted-printable:Miroslav =C5=A0ulc n;quoted-printable:=C5=A0ulc;Miroslav org:StartNet s.r.o. adr;quoted-printable;quoted-printable:;;Vrchlick=C3=A9ho 161/5;Praha 5;;150 00;=C4=8Cesk=C3=A1 republika email;internet:miroslav.sulc@startnet.cz title:CEO tel;work:+420 257 225 602 tel;cell:+420 603 711 413 x-mozilla-html:TRUE url:http://www.startnet.cz version:2.1 end:vcard --------------040805050708000200020000--