Article View: borland.public.interbase.sql
Article #571Re: Join takes too much time
From: Maxim Shiryaev
Date: Thu, 04 Oct 2007 08:57
Date: Thu, 04 Oct 2007 08:57
24 lines
1844 bytes
1844 bytes
Hi! The procedure is executed for each line of the T_EMPLOYEE_GENERAL. And then only a portion of its data is used. It's better to pass EG.EG_EMPLOYEEID as parameter and use it to filter a query inside the procedure. Maxim. "Olivier Peter" <peterolivier@hotmail.com> �������/�������� � �������� ���������: news:47049703$1@newsgroups.borland.com... > > I have a Table T_EMPLOYEE_GENERAL which i want to combine with a stored > procedure SP_EMPLOYEE_WORKPOINTSHISTORY. > The stored calculates the sum of points the employee has worked during > certain period grouped by Employee and Date. > > The stored procedure itself takes about 1 second to calculate as does the > retrieval of the employees. > The table contains about 30 Employees who do about 30 jobs (for the point > count) a day. > Still the following query takes about 15 seconds to finish. >
Technical Details
Message-ID:
<4704a9f4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.euro.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47049703$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,cd7986aef1014d63 X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII From: "Maxim Shiryaev" <MaximShiryaev@gmail.com> Newsgroups: borland.public.interbase.sql References: <47049703$1@newsgroups.borland.com> Subject: Re: Join takes too much time Date: Thu, 4 Oct 2007 12:57:03 +0400 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 213.234.197.62 Message-ID: <4704a9f4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1191487988 213.234.197.62 (4 Oct 2007 01:53:08 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.euro.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail