Querying the view

  • Dear All,

    I had created one view by joining 3 large tables with the group by class,

    while querying the view

    if i use select * from command , i got the result at 0 sec

    but if i use select top 1 * command it takes too much time

    why this take too much time?

  • could you show us your code please 🙂

    And perhaps the execution plan for both queries

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • Impossible to say without more information, but probably you're getting table scans.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

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