Showing posts with label plan. Show all posts
Showing posts with label plan. Show all posts

Wednesday, March 7, 2012

logical read vs actual row count

Hi

Can someone tell me what the difference between the logical read from statistics io and the actual row count from actual execution plan. I have a query that has the following

statistics io
Scan count 1, logical reads 484

actual execution plan
Clustered Index Seek
Actual Row Count : 40067

does this mean that sql has to read 484 pages from disk, and that 484 pages has over 40067 rows?

I wrote my query another way, and numbers becomes

statistics io
Scan count 1, logical reads 1207

actual execution plan
Clustered Index Seek
Actual Row Count : 133

the 1st query took about 2 seconds, but the seconds query took about 4 seconds. does this mean the logical read is more important

thanks

Paul


See SQL Server 2005 Books Online topics:
Reading Pages
http://msdn2.microsoft.com/en-us/library/ms191475.aspx

SET STATISTICS IO (Transact-SQL)
http://msdn2.microsoft.com/en-US/library/ms184361.aspx

Monday, February 20, 2012

Logging Off Users

I am trying to setup a DB Maintanance Plan and am getting an Error 5070:
Database state cannot be changed while other users are using the database.
Does anyone know what microsoft sql command would be to log off all the
users. (Like Oralce command of shutdown immediate.)
Thanks.Joel,
If its SQL Server 2000, you can use:
ALTER DATABASE <databasename >
SET single_user WITH ROLLBACK IMMEDIATE
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Joel" <nowhere@.nowhere.com> wrote in message
news:%23BLYt86SDHA.2144@.TK2MSFTNGP11.phx.gbl...
> I am trying to setup a DB Maintanance Plan and am getting an Error 5070:
> Database state cannot be changed while other users are using the database.
> Does anyone know what microsoft sql command would be to log off all the
> users. (Like Oralce command of shutdown immediate.)
> Thanks.
>|||Thanks
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:OCNoaE7SDHA.2004@.TK2MSFTNGP11.phx.gbl...
> Joel,
> If its SQL Server 2000, you can use:
> ALTER DATABASE <databasename >
> SET single_user WITH ROLLBACK IMMEDIATE
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "Joel" <nowhere@.nowhere.com> wrote in message
> news:%23BLYt86SDHA.2144@.TK2MSFTNGP11.phx.gbl...
> > I am trying to setup a DB Maintanance Plan and am getting an Error 5070:
> > Database state cannot be changed while other users are using the
database.
> >
> > Does anyone know what microsoft sql command would be to log off all the
> > users. (Like Oralce command of shutdown immediate.)
> >
> > Thanks.
> >
> >
>