From derby-user-return-1377-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Jun 01 17:27:13 2005 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 51045 invoked from network); 1 Jun 2005 17:27:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jun 2005 17:27:12 -0000 Received: (qmail 26098 invoked by uid 500); 1 Jun 2005 17:27:11 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 26069 invoked by uid 500); 1 Jun 2005 17:27:11 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 26029 invoked by uid 99); 1 Jun 2005 17:27:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from adsl.vanet.com.br (HELO adsl.vanet.com.br) (200.192.140.24) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 10:27:05 -0700 Received: from [10.10.10.100] (ip47067.poa.virtua.com.br [200.213.47.67]) (authenticated bits=0) by adsl.vanet.com.br (8.12.8/8.13.1) with ESMTP id j51HVNtA014036 for ; Wed, 1 Jun 2005 14:31:23 -0300 Message-ID: <429DEE1B.4050205@mgrinformatica.com.br> Date: Wed, 01 Jun 2005 14:19:23 -0300 From: Edson Carlos Ericksson Richter User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: pt-br, pt MIME-Version: 1.0 To: Derby Discussion Subject: Re: Very slow References: <429CB54A.70902@mgrinformatica.com.br> <429CBB83.8080701@gmail.com> <429CBC1C.4080109@mgrinformatica.com.br> <429CC6B3.1020107@mgrinformatica.com.br> <429CCFE4.3070002@gmail.com> <429DD267.3060104@sbcglobal.net> <429DE1FC.4060002@gmail.com> In-Reply-To: <429DE1FC.4060002@gmail.com> Content-Type: multipart/mixed; boundary="------------030303070105030404000607" X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------030303070105030404000607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks for fast response. I think the reason Derby didn't used any index is because since this table, for my tests purposes has only one record, I've not created any index at all. I suspect that one record table will be in cache for a long time (since it's a comment making queries over this table in my code). At all, this one record is having "cost 13", so it's not the problem. My problem appear be in the sub-select. Each sub-select make queries over a 33000 records table. I think I forgot to make a better index for it. After indexing, performance got better (not perfect, but it's usable - I think the large amout of log being generated is the reason for the little delay in responses). The cost for sub-select query dropped down from near 13000 to 19,85. I other databases (like MaxDB and MS SQL, this table was kept in memory, because he is considered "small"). That's the reason I never made any indexing over it. I'll try links sent at other mails, so I could discover if Tomcat integration has it's secrets too. Thank you all for comments, Edson Richter --------------030303070105030404000607 Content-Type: text/x-vcard; charset=utf-8; name="edson.richter.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="edson.richter.vcf" begin:vcard fn:Edson Carlos Ericksson Richter n:Richter;Edson org;quoted-printable:MGR Inform=C3=A1tica Ltda;Desenvolvimento adr:Cristo Redentor;;Assis Brasil, 3257, Sala 409;Porto Alegre;RS;91010007;Brasil email;internet:edson.richter@mgrinformatica.com.br title:Diretor de Sistemas tel;work:(51)3347-0446 tel;cell:(51)9259-2993 x-mozilla-html:FALSE url:http://www.mgrinformatica.com.br version:2.1 end:vcard --------------030303070105030404000607--