Skip to content

Write-SqlTableData with ProgressAction set to Continue appears to be consuming considerably more memory than with SilentlyContinue #98

@pf-malandry

Description

@pf-malandry

Write-SqlTableData with ProgressAction set to Continue appears to be consuming considerably more memory than with SilentlyContinue.

When ProgressAction is set to continue we observed the memory usage to be growing at a faster rate up to a point where it slows down every data input using a pipeline.

When ProgressAction is set to SilentlyContinue, we observe reasonable memory usage and no slowdown in the data input using a pipeline.

Testing with IIS logs as sources.
Mock code: Get-Content <iis log file> | ? { $_ -inotmatch '^#' } | Write-SqlTableData -Force...

Processing a file of only 3000 lines may cause PowerShell to consume over 4GiB of memory if ProgressAction is set to Continue. Barely ~400 MiB if set to SilentlyContinue.

Using SqlServer v22.3.0 with ISE 5.1.
The issue is also observed with PowerShell 5.1.

This may be related to the closed issue #75.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions