• .Patrick (10/24/2016)


    Hi all,

    Currently we are developing a new application for our company and I got a question related to the database architecture. We one database (DatabaseA) that is our main database, our main application write and reads to that database. Now we are creating an web application so customers can view data related from that system. Now I have the following idea (also from security sight):

    Create a new database (DatabaseB) and create only views in that database (And maybe one or two tables having data merged from DatabaseA for easy reading) and in those views there are SELECT statements that SELECT data from DatabaseA.

    Now the question is:

    Will there be a huge performance impact if I query DatabaseA from DatabaseB and does it effect even more if I put them in views or is this performance impact close to none? Tables we are going to SELECT from can have up to 40.000.000 million records.

    I was looking in to indexed views and that seems to impact peformance of the query itself not the performance of reading cross database. (This is where I can be wrong...)

    Thanks in advance!

    40 million million is a huge number of rows. I'd be very careful with any web application which touches that table.

    But putting your queries in views in another database on the same instance should not have any noticeable additional overhead to having those same queries in your main DB.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.