Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 396223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:31:50+00:00 2026-05-12T16:31:50+00:00

My company has recently put up a demo database on his remote servers to

  • 0

My company has recently put up a demo database on his remote servers to allow some of our partners to test our beta version of the software.

We noticed, as expected, some bottlenecks in some parts of the program, in particular on the places in which many queries are done.

For example, I have to load customer from database, with all his products associated to him.

Normally this operation would be done as

  • select somefields from customers where id = someId
  • Store it to business class
  • select someotherfiels from products where customerid = previousid
  • store to collection and show/use them.

Imagine a much more complex business logic, which would gather 8 to 12 tables in the same way. With a local database, this would be instant. But by connecting to a remotely hosted SQL Server, this is extremely slow.

We found out that making a single query, like

SELECT Customer.Field1, Customer.Field2, Product.Field1, Product.Field2,
       --//LIST OTHER 200 FIELDS FROM 10 DIFFERENT TABLE SE SAME WAY 
FROM Customer
LEFT JOIN Product ON Product.IdCustomer = Customer.IdCustomer
--//LEFT JOIN OTHER 10 TABLES THE SAME WAY
WHERE Customer.IdCustomer = 10

amazingly improved the speed of the whole execution.
The fact that this is more complex than the single selects of each of them doesn’t compare to the fact that is only one access to the server.
I am talking about ~2000/3000ms to 80-120ms.

Here comes the true problem (sorry about the long preface).
How can i save data to a remote SQL Server in an efficient way?

Imagine i have a window/form/dialog/frame/whatever where i ought to save more tables after a given operation.

For example:

  • INSERT INTO Customer (Field) VALUES ('hello world') “IdCustomer” is an identity column
  • Fetch the new Id from database
  • INSERT INTO SomeLinkedTable (IdCustomer, Field) VALUES (x, 'new value')
  • Fetch new “IdSomeLinkedTable”, use it to link some table, ecc ecc..

This is a common way of multiple saving in our program. Even if we don’t leave the user without some message that the operation is gonna take a while, waiting ~10s to do a frequent multi-insert operation is way too much.

Maybe it’s a simple server configuration problem, but i swear all the firewalls in both sides (our & server) are properly configured to allow some SQL Server access.

Anyone encountered the same problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:31:51+00:00Added an answer on May 12, 2026 at 4:31 pm

    If you pulled all your business logic into the app layer, then your app layer must live close to the database.

    The solution to make a fast and snappy remote applicaiton is to use fiefdoms-and-emissaries so you remove the tight coupling to the database.

    As an interim solution you can speed up any operation by removing the round-trips to the database. If you have to save a master-detail form, you send the entire operation as a single T-SQL batch (INSERT header, SELECT @@identity, INSERT all details) as one single batch. Of course, in practice this means you moved your business logic into the T-SQL batches, and now that the logic lives in the database is better to have in in stored procs anyway.

    At the end of the day, you can’t have your cake and eat it too. You can either make a autonomous disconnected application that supports a remote, ocassionally connected db, and demo that, or make a tightly coupled application that must live close to the database and demo that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our company has a product which relies on local database to work (it allows
Recently a new co-op was hired at our company and has been tasked to
My company has recently added some new code styling rules, and I would was
Our company has recently switched version control systems to SVN using TortoiseSVN as our
Our company has recently switched over to using After the Deadline for our spell
Recently our company has started measuring the cyclomatic complexity (CC) of the functions in
I'm in a position where our company has a database search service that is
Our company has recently been signed up with a franchise to provide their customers
My company has a CRM site hosted externally on a shared server and recently
Our company has a share point document server where the UNC looks something like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.