Subject Re: [firebird-support] DELAY OR WAIT
Author Martijn Tonies
Hi,

> Are there any supported functions in SQL to do
> command delay :
> delay(msec)
> or
> wait(msec) ?
>
> lets say is system service stored proc :
> while not (exists (select * blah blah)) do
> begin
> delay(1500);
> end
> If I run such statement without delay it would consume all CPU.

No, there isn't.

But what's wrong with consuming all CPU time? The server itself
should schedule the threads.

If you really like, you COULD create an UDF that does the "wait"
for you, as an UDF blocks execution of the thread that executes it.
I think.

Just double check with someone who knows ;-) -- that the UDF
call doesn't block the whole server.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com