home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,918 of 19,505   
   Gert-Jan Strik to basis_consultant@hotmail.com   
   Re: Set MSSQL 2005 to Favor Returning Fi   
   23 Sep 10 22:40:01   
   
   bef0a075   
   From: sorrytoomuchspamalready@xs4all.nl   
      
   "basis_consultant@hotmail.com" wrote:   
   >   
   > Hi,   
   >   
   > I am not sure whether I am posting to the correct group; If not,   
   > please tell   
   > me which groups are better.   
   >   
   > My experience has been mainly with Oracle. In Oracle (9i+) there is an   
   > optimizer   
   > mode name FIRST_ROWS (Now FIRST_ROWS_N), typically used in  OLTP   
   > environments.   
   >   
   > It hints that the database should favor returning the first N rows of   
   > a query   
   > as soon as possible; The rest of the query can continue running in the   
   > background.   
   > Typically, this mode favors indexes over full-table scans.   
   >   
   > The idea is that the user sees a result set quickly.   
   >   
   > Is there something similar in MSSQL 2005? If so, any info or links   
   > will   
   > be greatly appreciated.   
   >   
   > Thanks,   
   > QZ   
      
   Yes there is. You can use the query hint OPTION (FAST ), as   
   in:   
      
     SELECT my_column   
     FROM my_table   
     OPTION (FAST 10)   
      
   You can check Books Online (BOL) for more information.   
   --   
   Gert-Jan   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca