Article View: borland.public.interbase.sql
Article #811Re: performance
From: Tiberiu Horvath
Date: Thu, 10 May 2007 17:28
Date: Thu, 10 May 2007 17:28
46 lines
2166 bytes
2166 bytes
stoc_temporar: 14500 records produse : 9700 records gestiune : 5 records "Tiberiu Horvath" <exact@exactonly.ro> wrote in message news:464355cc@newsgroups.borland.com... > > I have the following query, that takes 6..8 seconds on a large (4000 > records in stoc_temporar) database. Is there a way to speed up this ? > > > Thank you in advance, > > Tiberiu > > > select > sum(stoc_temporar.stoc) as stoc, > produse.denumire > from produse > inner join stoc_temporar on (stoc_temporar.id_produs=produse.id_produs) > where > produse.id_sortiment=3 and > stoc_temporar.id_gestiune=1 > group by > produse.denumire > order by > produse.denumire > > > PLAN JOIN (PRODUSE ORDER DENUMIRE_IDX INDEX > (FK_PRODUSE_REFERENCE_SORTIMEN), STOC_TEMPORAR INDEX > (FK_STOC_TEM_REFERENCE_PRODUSE, FK_STOC_TEM_REFERENCE_GESTIUNE)): > PLAN JOIN (PRODUSE ORDER DENUMIRE_IDX INDEX > (FK_PRODUSE_REFERENCE_SORTIMEN), STOC_TEMPORAR INDEX > (FK_STOC_TEM_REFERENCE_PRODUSE, FK_STOC_TEM_REFERENCE_GESTIUNE)) > > Adapted plan: > PLAN JOIN (PRODUSE ORDER DENUMIRE_IDX INDEX > (FK_PRODUSE_REFERENCE_SORTIMEN), STOC_TEMPORAR INDEX > (FK_STOC_TEM_REFERENCE_PRODUSE, FK_STOC_TEM_REFERENCE_GESTIUNE)) > > >
Technical Details
Message-ID:
<46435659@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<464355cc@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,65a795d106dce3a2 X-Google-Attributes: gid114a0e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Tiberiu Horvath" <exact@exactonly.ro> Newsgroups: borland.public.interbase.sql References: <464355cc@newsgroups.borland.com> Subject: Re: performance Date: Thu, 10 May 2007 20:28:57 +0300 Lines: 48 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 86.122.211.180 Message-ID: <46435659@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1178818137 86.122.211.180 (10 May 2007 10:28:57 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail