Categories:

System functions (System Control)

SYSTEM$WAIT

等待指定的时间后再继续。

语法

SYSTEM$WAIT( amount [ , time_unit ] )

实参

必填:

amount

Number specifying the amount of time to wait as determined by time_unit.

可选:

time_unit

Time unit for amount. Accepted values are DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS, MICROSECONDS, NANOSECONDS. The unit should be in single quotes (see Examples below).

默认:SECONDS

使用说明

  • 大多数系统没有纳秒级精度的时钟。因此:

    • 实际等待时间可能与指定的等待时间不完全相同。
    • 报告的等待时间可能不准确。
  • SYSTEM$WAIT checks periodically for cancellation. If a user cancels a query while it is waiting, there might be a delay between the time the query is cancelled and the time the cancellation takes effect.

  • 如果等待时间超过编译超时,查询不会自动取消。等待时间结束后,查询恢复正常。

示例

CALL SYSTEM$WAIT(10);

-------------------+
    SYSTEM$WAIT    |
-------------------+
 waited 10 seconds |
-------------------+
CALL SYSTEM$WAIT(2, 'MINUTES');

-------------------+
    SYSTEM$WAIT    |
-------------------+
 waited 2 minutes  |
-------------------+