database access over views --> slow querys

  • Hello

    I haven't a lot of expirence in database deployment.

    But our software vendor installed as a strange db-construct, with a performance problem and he gives the fault to our server.

    DB-Srv1:

    Database: db_commun with some tables (postal code, streets...)

    DB-Srv2: db_commun without tables, but views on db_srv1.db_commun. The views have the same name like the tables ind db-srv1.db_commun

    A direct query on db-srv1.db_commun is faster than a second. The same query on db-srv2.db_commun takes 7 seconds.

    My question: is that way a normals practice to access on a db? For me it makes more sense to mirror the db...?

    thanks for a feedback.

  • I have seen this done before for security and performance reasons.

    The speed difference could be down to network speeds what sort of network are they on?

    Also a Mirror would not be useful in this situation as the mirrored database is not accesable, Replication would be another option.

  • It's something that can be done and should not affect performance. The views should be expanded as the source tables and cause no harm on the performance side.

    Have you tried comparing the execution plans?

    EDIT:

    I misread your question, Now I see you're working with two different servers... It makes some difference, it becomes a remote query.

    -- Gianluca Sartori

  • The databases are stored in a hp-san-system which is gigabit-attached. So I don't think that will be the problem....

  • Cross server queries can be troublesome , in you view on DB-Srv2 are you joining to any other tables ?

    Please post DDL, and execution plans as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/



    Clear Sky SQL
    My Blog[/url]

  • back from holiday....

    our external sql-expert analysed the problem and configured a replication for the database.

    Now the performance is much better.

    thanks@all replies.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply