question

AndrewHuangBeyondsoftCorporation-5706 avatar image
0 Votes"
AndrewHuangBeyondsoftCorporation-5706 asked PRADEEPCHEEKATLA-MSFT commented

Why does the query become slow after adding the where condition

No where condition, query takes about 20s

SELECT 
COUNT_BIG(*) AS UserCount
FROM OPENROWSET(
BULK 'adl://adPlatform-AudienceIntelligence-Scoring-proxy-c11.azuredatalakestore.net/local/IEBKS/XboxAol/Config/Custom_All_History.ss',
FORMAT = 'SStream',PARSER_VERSION = '2.0')
WITH(
    GameId BIGINT,
    LastDate DATETIME2
)
AS ss


Added where condition, took longer than 10min, caused timeout to close connection.:
Websocket connection was closed unexpectedly.


SELECT 
COUNT_BIG(*) AS UserCount
FROM OPENROWSET(
BULK 'adl://adPlatform-AudienceIntelligence-Scoring-proxy-c11.azuredatalakestore.net/local/IEBKS/XboxAol/Config/Custom_All_History.ss',
FORMAT = 'SStream',PARSER_VERSION = '2.0')
WITH(
    GameId BIGINT,
    LastDate DATETIME2
)
AS ss
WHERE
GameId =60666752
azure-synapse-analytics
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @AndrewHuangBeyondsoftCorporation-5706,

Following up to see if the below suggestion was helpful. And, if you have any further query do let us know.


  • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.

0 Votes 0 ·

1 Answer

PRADEEPCHEEKATLA-MSFT avatar image
0 Votes"
PRADEEPCHEEKATLA-MSFT answered PRADEEPCHEEKATLA-MSFT commented

Hello @AndrewHuangBeyondsoftCorporation-5706,

Thanks for the question and using MS Q&A platform.

If your query fails with the error message: 'Websocket connection was closed unexpectedly', it means that your browser connection to Synapse Studio was interrupted, for example because of a network issue.

To resolve this issue, rerun this query. If this message occurs often in your environment, advise help from your network administrator, check firewall settings, and visit this troubleshooting guide for more information.

  • If the issue still continues, try Azure Data Studio or SQL Server Management Studio for the same queries instead of Synapse Studio for further investigation.

  • If the issue still continues, create a support ticket through the Azure portal .

For more details, refer to Azure Synapse - Self-help for serverless SQL pool.

Hope this will help. Please let us know if any further queries. Thank you.


  • Please don't forget to click on Accept Answer button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification

  • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @AndrewHuangBeyondsoftCorporation-5706,

Just checking in to see if the above answer helped. If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·