Board index » delphi » Multithreaded Queries with MS SQL Server 7

Multithreaded Queries with MS SQL Server 7

Running multithreaded queries with MS SQL Server 7 I notice that one query
waits in a queue until the other is finished before it gets executed.  Okay,
so this happens with some other databases too (not Interbase though, I might
add), but seemingly, to get two or more queries to run simultaneously in
separate threads, one needs to have a separate TSession and TDatabase which
ultimately means a licensing issue.

Has anyone figured a go around for this silly quirk?  We don't want to
purchase more licenses to keep up with the multiple licenses required for
threaded queries.  Most other DB's out there provide for X number of
connections per seat.

 

Re:Multithreaded Queries with MS SQL Server 7


This is a known limitation with using the BDE.  It's not a server
issue so the "not Interbase" comment is a reflection of BDE support
for Interbase, not that Interbase is any way "better" or "different". You
can use ADO and this issue will go away. However, you are not
using up "connection licenses" if you make multiple database
connections per client. Each user is defined by the MAC
address and the number of connections per address doesn't
matter.

HTH,

Craig Baugh

Quote
Perry Way <nos...@nospam.com> wrote in message news:8807l5$dnv1@bornews.borland.com...
> Running multithreaded queries with MS SQL Server 7 I notice that one query
> waits in a queue until the other is finished before it gets executed.  Okay,
> so this happens with some other databases too (not Interbase though, I might
> add), but seemingly, to get two or more queries to run simultaneously in
> separate threads, one needs to have a separate TSession and TDatabase which
> ultimately means a licensing issue.

> Has anyone figured a go around for this silly quirk?  We don't want to
> purchase more licenses to keep up with the multiple licenses required for
> threaded queries.  Most other DB's out there provide for X number of
> connections per seat.

Re:Multithreaded Queries with MS SQL Server 7


Quote
Perry Way wrote:

> Running multithreaded queries with MS SQL Server 7 I notice that one query
> waits in a queue until the other is finished before it gets executed.  Okay,
> so this happens with some other databases too (not Interbase though, I might
> add), but seemingly, to get two or more queries to run simultaneously in
> separate threads, one needs to have a separate TSession and TDatabase which
> ultimately means a licensing issue.

> Has anyone figured a go around for this silly quirk?  We don't want to
> purchase more licenses to keep up with the multiple licenses required for
> threaded queries.  Most other DB's out there provide for X number of
> connections per seat.

Not really. Oracle uses the Power unit (MHz), with unlimited
connections.
If your DB app is a back end for a Web server, how would you handle it?
The whole notion of multithreading implies miltisession. There are
"tricks" to do connection pooling, but you would need to use semaphores
and critical sections, synchronization, etc. but even then it would be
extremely hard to actually execute two queries simultaneously in a
single session. Even the mighty Borland does not have a decent MTA DCOM
implementation yet.

Stilian

Re:Multithreaded Queries with MS SQL Server 7


Craig,

Thanks for the input.  Hadn't even thought about using ADO.. guess its
because I only have Delphi 5 at home, not at work.  Well this is sufficient
reason alone to upgrade to Delphi 5 at work.

Thanks,

Perry

Quote
cbaugh wrote in message <880qnt$do...@bornews.borland.com>...
>This is a known limitation with using the BDE.  It's not a server
>issue so the "not Interbase" comment is a reflection of BDE support
>for Interbase, not that Interbase is any way "better" or "different". You
>can use ADO and this issue will go away. However, you are not
>using up "connection licenses" if you make multiple database
>connections per client. Each user is defined by the MAC
>address and the number of connections per address doesn't
>matter.

>HTH,

>Craig Baugh

>Perry Way <nos...@nospam.com> wrote in message

news:8807l5$dnv1@bornews.borland.com...

- Show quoted text -

Quote
>> Running multithreaded queries with MS SQL Server 7 I notice that one
query
>> waits in a queue until the other is finished before it gets executed.
Okay,
>> so this happens with some other databases too (not Interbase though, I
might
>> add), but seemingly, to get two or more queries to run simultaneously in
>> separate threads, one needs to have a separate TSession and TDatabase
which
>> ultimately means a licensing issue.

>> Has anyone figured a go around for this silly quirk?  We don't want to
>> purchase more licenses to keep up with the multiple licenses required for
>> threaded queries.  Most other DB's out there provide for X number of
>> connections per seat.

Other Threads