Board index » delphi » Q: Threads and databases

Q: Threads and databases

I have a program which must read information from a database when a
certain string is received. The string is containing information that
should be looked up in the database. The thing is that if i have one
database i must wait until the search is done. And then process the
other incoming string.

If i create the database under a thread with a session components it's
slow.

I have to process the string as soon as it arrives to the server. I
must be able to process upto 20 searches at once,

Does anybody have any idea on how to perfor such a lookup.

Regards

Martin Arvidsson, MicroTel Technology AB

Please reply to the address below, remove "nospam_" to reply
nospam_mar...@microtel.se

Thanx

Martin Arvidsson, MicroTel Technology, Sweden.

 

Re:Q: Threads and databases


Re:Q: Threads and databases


Have you tried setting the thread's priority to tpTimeCritical???

ie.

        My_Thread.Priority := tpTimeCritical;

There are several other settings for this property.   Setting the priority
to tpTimeCritical will give it all the highest processor/resource
priority...making the thread execute faster...giving the thread priority
over the main thread.

Njoy,
bp

Martin Arvidsson <nospam_mar...@microtel.se> wrote in article
<34e02c19.66126...@nntpserver.swip.net>...

Quote
> I have a program which must read information from a database when a
> certain string is received. The string is containing information that
> should be looked up in the database. The thing is that if i have one
> database i must wait until the search is done. And then process the
> other incoming string.

> If i create the database under a thread with a session components it's
> slow.

> I have to process the string as soon as it arrives to the server. I
> must be able to process upto 20 searches at once,

Re:Q: Threads and databases


Re:Q: Threads and databases


I have a program which must read information from a database when a
certain string is received. The string is containing information that
should be looked up in the database. The thing is that if i have one
database i must wait until the search is done. And then process the
other incoming string.

If i create the database under a thread with a session components it's
slow.

I have to process the string as soon as it arrives to the server. I
must be able to process upto 20 searches at once,

Does anybody have any idea on how to perfor such a lookup.

Regards

Martin Arvidsson, MicroTel Technology AB

Please reply to the address below, remove "nospam_" to reply
nospam_mar...@microtel.se

Thanx

Martin Arvidsson, MicroTel Technology, Sweden.

Other Threads