O'Reilly Forums: Performance Issue When Switching Databases Using Linked Servers - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Performance Issue When Switching Databases Using Linked Servers when using linked servers, schema is fetched every time unless databas Rate Topic: -----

#1 User is offline   Hannes K. 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 15-December 11

Posted 15 December 2011 - 10:54 AM

My setup: several remote Sql servers and my local machine. Database schemas are roughly the same, Database names match.

Lets say I have 10 databases per machine, together with my local machine that's a lot of stuff in the dropdown menu. I found a way to circumvent that, making (dev) life a lot easier: just using the linked server feature (pro version) by creating connection to special database and ctrl + dragn'drop all the other 9 databases into the connection.
Now I have one entry per server in the dropdown list, 5 instead of 50, and can access every database in every query (intermixing databases comes in handy for some queries).

But the *problem* is, everytime I switch the servers, it fetches the schema for all databases, which takes up to 20 seconds. It _doesn't_ do that if I expanded the according connection in the tree view first. Then, changing between servers is essentially just the query.

Please fix that, as it is really killing the workflow of easily switching between servers for me. :)

This post has been edited by Hannes K.: 15 December 2011 - 10:56 AM

0

#2 User is offline   JoeAlbahari 

  • Super Veteran Member
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 529
  • Joined: 15-February 08
  • Gender:Male
  • Location:Perth, Australia

Posted 16 December 2011 - 08:32 PM

LINQPad releases data contexts that are not in use and not expanded in the schema explorer - this is to avoid what would appear to users as a memory leak.

I've added a 2-hour timeout for the 10 most recent contexts in the latest 4.37.9 beta. To keep them permanently alive, however, you'll still have to expand their nodes in the treeview.

btw, you said you were using multiple-database contexts mainly because you didn't want a lot of items in the dropdown menu. Presumably you're aware that you don't need to use the dropdown - you can just drag a database from the schema explorer (without the ctrl key) to the editor. Or with the keyboard, Shift+Alt+S to select Schema Explorer and then Ctrl+D to make a database current.
0

#3 User is offline   Hannes K. 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 15-December 11

Posted 19 December 2011 - 01:18 AM

Thanks!

The schema explorer dragn'drop isn't an option for the same reasons: there are too many options imo. It takes too long, esp. with a long list of databases per server.

Btw. great video from Australias techEd! Really love the Async Dataflow CTP learning stuff you put up.

This post has been edited by Hannes K.: 19 December 2011 - 01:18 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users