SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Q: Bootstrap queries

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Q: Bootstrap queries
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Q: Bootstrap queries Reply with quote
What exactly are Bootstrap queries in Connections? From the name, I guessed they would run whenever a new connection is made but that does not seem to happen. I put this there:
Code:

SET STATISTICS IO ON;
SET STATISTICS TIME ON;

and I expected they had taken effect, but they had not.

UPDATE: very interesting. Sometimes it works, sometimes it does not. I couldn't yet figure out what it depended on.

UPDATE2: okay, it's a bit less fuzzy now. If I run a query in the editor, it works. However, when I execute a snippet that yields a result set into the results pane, instead of inserting plain code into the editor, SA still shows the Messages tab. With STATISTICS TIME OFF, the Messages tab only has one message or row, something like this:
Quote:

24 rows fetched (30.85 ms).


But when it is ON, the STATISTICS TIME seems to be thinking about kicking off, but then it suddenly changes its mind. The Messages tab now has two lines:
Quote:

Msg 3613, Level 0, State 0, SQL Server parse and compile time: CPU time = 0 ms, elapsed time = 0 ms....
24 rows fetched (36.23 ms).

The first line suspiciously smells like something STATISTICS TIME would write...

But there isn't any trace of STATISTICS IO adding its two cents when triggering a snippet-powered result set, it only works when executing the query straight from the editor.
Sun Apr 21, 2024 6:09 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7853

Post Reply with quote
You guessed correctly, they are run automatically on connect for all sessions. Your investigation made me think there are two kinds od connections, for interactive sessions and for internal operations, and it appears that not all internal connections execute the boostrap queries. Let me submit a ticket for that and gather more details.
Mon Apr 22, 2024 12:47 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7853

Post Reply with quote
This might be an edge case scenario, i mean enabling statistics and similar things, the syntax and performance checker manipulate them too, and so they may change in mid air. Bootsrap queries are mostly for setting up the session context, for example, current schema, session variables like timezone, datetime format, search_path, and so on. This is not very commonly used with SQL Server cliends though.
Mon Apr 22, 2024 7:20 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.