Skip to content

Poor performance for SQL notebook cells #4147

@weeser

Description

@weeser

Describe the bug

I am a user migrating over from ADS. Queries ran on MS SQL Server inside of a notebook cell takes a magnitude longer to execute compared to a raw .sql file. The database being used in this case is the Wide World Importers database. This is being done inside of a Ubuntu 24 docker container where the SQL Server instance is running. The notebook query takes ~53 seconds, whereas the .sql file runs the same query in just ~1.5 seconds.

USE WideWorldImporters;

SELECT *
FROM WideWorldImporters.Sales.Invoices;

Runtime for .sql file:

Started executing query at Line 1
(70510 rows affected)
Total execution time: 00:00:01.691

Runtime for notebook file:

Image

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

.NET Interactive
© 2020-2025 Microsoft Corporation
Version: 1.0.707101+2588b706246c2401deb8f8eb66ccb38cc176710c
Library version: 1.0.0-beta.26071.1+2588b706246c2401deb8f8eb66ccb38cc176710c
https://github.com/dotnet/interactive

  • OS
    • [ X ] Windows 11
    • Windows 10
    • macOS
    • [ X ] Linux - Ubuntu 24 docker container
    • iOS
    • Android
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • [ X ] Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions