microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.55k stars 898 forks source link

Exporting hangup #23161

Open MarcosHerasme opened 1 year ago

MarcosHerasme commented 1 year ago

Issue Type: Bug

When exporting to Excel 250,000 records, sometime it works sometme not.

Azure Data Studio version: azuredatastudio 1.43.0 (b790d700898b1095d83e62f0de14678a58222520, 2023-04-10T23:12:44.872Z) OS version: Darwin arm64 22.4.0 Restricted Mode: No Preview Features: Enabled

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|4, 4, 4| |Memory (System)|64.00GB (30.05GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (5) Extension|Author (truncated)|Version ---|---|--- deletedb|Ale|0.0.3 sql-data-inspector|ern|0.6.0 azuredatastudio-postgresql|Mic|0.2.7 azdata-sanddance|msr|4.1.1 schema-visualization|R0t|0.8.2
alanrenmsft commented 1 year ago

@caohai is this something you looked into before?

caohai commented 1 year ago

@caohai is this something you looked into before?

@alanrenmsft No I didn't look into this one, I can take a look.

caohai commented 1 year ago

Hi @MarcosHerasme , thanks for reporting this. I did a quick test on Windows and Mac (Intel) with following query and exported 250k/500k records to Excel and didn't see it hangs up. You can also try it out on your machine and see if exporting hangs with this query. Do you have a lot of columns in the result? Is there any other error message or any other info you can help us repro this issue?

WITH RandomNumbers AS (
    SELECT ABS(CHECKSUM(NEWID())) AS RandomNumber
    union ALL
    SELECT ABS(CHECKSUM(NEWID())) AS RandomNumber
    FROM RandomNumbers
)
SELECT TOP 250000 RandomNumber AS RandomNumber1
FROM RandomNumbers
OPTION (MAXRECURSION 0 )

image

Charles-Gagnon commented 1 year ago

@caohai This seems like a good opportunity to add some more perf measurements in case we aren't able to repro this ourselves. That would at least let us see what part is taking a long time and could help narrow down what the issue is

alanrenmsft commented 1 year ago

@MarcosHerasme could you please try the latest insiders build? I've made some changes to the query area which might help the export scenario as well. https://github.com/microsoft/azuredatastudio#try-out-the-latest-insiders-build-from-main-branch

if it still doesn't work, please follow the instructions and share the logs with us.

github-actions[bot] commented 1 year ago

We need more info to debug your particular issue. If you could attach your logs to the issue (ensure no private data is in them), it would help us fix the issue much faster. First open the Settings page, find the Mssql: Tracing Level setting and change that to All then restart ADS and repro your issue. Next there are two types of logs to collect:

Console Logs