等待 ”Streams AQ: Enqueue Blocked On Low Memory" 导致Datapump缓慢

遇到问题如下

执行impdp导入的时候,即使导入对象非常小。也在初始化阶段等待很久。
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Master table “SYS_IMPORT_TABLE_01” successfully loaded/unloaded

最终耗时:elapsed 0 00:01:35
等待事件为:Streams AQ: Enqueue Blocked On Low Memory

于是找到这篇文章

由于频繁等待 ”Streams AQ: Enqueue Blocked On Low Memory" 而导致Datapump Expdp或Impdp变慢 (文档 ID 2469587.1)

症状

Datapump导出和导入(expdp和impdp)可能会遇到突然严重的性能问题,因为DW和DM进程经常等待 “StreamsAQ: enqueue blocked on low memory”。

以下是expdp logtime = all命令的示例症状。 (logtime 参数在 12.1 及以上版本可用)
导出空分区表需要0-3秒才能导出每个分区,而正常时通常需要不到一秒的时间。

11-APR-18 18:02:26.726: Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER 11-APR-18 18:02:37.672: . . exported ""."":"<p>" 0 KB 0 rows 11-APR-18 18:02:40.677: . . exported ""."":"</p><p>" 0 KB 0 rows 11-APR-18 18:02:42.686: . . exported ""."":"</p><p>" 0 KB 0 rows 11-APR-18 18:02:45.699: . . exported ""."":"</p><p>" 0 KB 0 rows 11-APR-18 18:02:48.702: . . exported ""."":"</p><p>" 0 KB 0 rows 11-APR-18 18:02:50.712: . . exported ""."":"</p><p>" 0 KB 0 rows 11-APR-18 18:02:53.724: . . exported ""."":"</p><p>" 0 KB 0 rows </p>