Monday, March 19, 2012

extended stored procedure

Hi
I wrote a Delphi program to create a dll.after that, I added an extended
procedure to sql server using this dll. unfortunately this extended procedur
e
is too slow ( for excution on a table with 100000 rows, it takes 1 minute to
finish the extended procedure) . I recognized that the lack of speed arises
from communication between sql and delphi. writing this procedure by sql led
to worse performance.
what should I do to speed up the extended procedure?
Thanks."Tajik" <Tajik@.discussions.microsoft.com> wrote in message
news:1B4C8834-16CA-4B43-B691-9F385F3C437C@.microsoft.com...
> Hi
> I wrote a Delphi program to create a dll.after that, I added an extended
> procedure to sql server using this dll. unfortunately this extended
> procedure
> is too slow ( for excution on a table with 100000 rows, it takes 1 minute
> to
> finish the extended procedure) . I recognized that the lack of speed
> arises
> from communication between sql and delphi. writing this procedure by sql
> led
> to worse performance.
> what should I do to speed up the extended procedure?
> Thanks.
>
What does the extended proc do? I'm guessing you are calling the proc or
some other code once for each row. If I'm right then I don't think it will
scale well. Try to implement the same logic as set-based code using TSQL,
then call the TSQL proc from your Delphi code.
David Portas
SQL Server MVP
--

No comments:

Post a Comment