Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Friday, March 30, 2012

Poor query performance with: set statistics time on (SQL2K5)

Hi,
I try this query:
--
use AdventureWorks
go
select c.*,o.* from sales.salesorderheader o join sales.customer c
on o.customerid=c.customerid
go
set statistics time on
go
-- try the query again
select c.*,o.* from sales.salesorderheader o join sales.customer c
on o.customerid=c.customerid
--
the second query after setting "statistics time" is very slow on my
computer. I'd like to know if anybody else has the same problem?
Thanks in advance,
LeilaI tested it on 2005 SP1 using Management Studio. I ran it as give,
and with the order reversed. I also added select getdate() lines to
give a measure of elapsed time. Results were returned to a grid.
With statistics time on the query took a bit more than twice as long
to run.
Roy Harvey
Beacon Falls, CT
On Wed, 3 May 2006 03:39:17 +0430, "Leila" <Leilas@.hotpop.com> wrote:

>Hi,
>I try this query:
>--
>use AdventureWorks
>go
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>go
>set statistics time on
>go
>-- try the query again
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>--
>the second query after setting "statistics time" is very slow on my
>computer. I'd like to know if anybody else has the same problem?
>Thanks in advance,
>Leila|||Leila and Roy,
I can also reproduce this behavior. I don't have an answer
or workaround, but I'd suggest one of you file it as a bug
at http://lab.msdn.microsoft.com/productfeedback/
Steve Kass
Drew University
Leila wrote:

>Hi,
>I try this query:
>--
>use AdventureWorks
>go
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>go
>set statistics time on
>go
>-- try the query again
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>--
>the second query after setting "statistics time" is very slow on my
>computer. I'd like to know if anybody else has the same problem?
>Thanks in advance,
>Leila
>
>
>|||On Wed, 03 May 2006 00:00:42 -0400, Steve Kass <skass@.drew.edu> wrote:
>Leila and Roy,
>I can also reproduce this behavior. I don't have an answer
>or workaround, but I'd suggest one of you file it as a bug
>at http://lab.msdn.microsoft.com/productfeedback/
>Steve Kass
>Drew University
Yikes.
Just for the record, I've been using statistics io on a lot over the
last year or so, and on SQL2000 it generally had a small impact, maybe
5 to 10 percent.
Josh

Poor query performance with: set statistics time on (SQL2K5)

Hi,
I try this query:
--
use AdventureWorks
go
select c.*,o.* from sales.salesorderheader o join sales.customer c
on o.customerid=c.customerid
go
set statistics time on
go
-- try the query again
select c.*,o.* from sales.salesorderheader o join sales.customer c
on o.customerid=c.customerid
--
the second query after setting "statistics time" is very slow on my
computer. I'd like to know if anybody else has the same problem?
Thanks in advance,
LeilaI tested it on 2005 SP1 using Management Studio. I ran it as give,
and with the order reversed. I also added select getdate() lines to
give a measure of elapsed time. Results were returned to a grid.
With statistics time on the query took a bit more than twice as long
to run.
Roy Harvey
Beacon Falls, CT
On Wed, 3 May 2006 03:39:17 +0430, "Leila" <Leilas@.hotpop.com> wrote:
>Hi,
>I try this query:
>--
>use AdventureWorks
>go
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>go
>set statistics time on
>go
>-- try the query again
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>--
>the second query after setting "statistics time" is very slow on my
>computer. I'd like to know if anybody else has the same problem?
>Thanks in advance,
>Leila|||Leila and Roy,
I can also reproduce this behavior. I don't have an answer
or workaround, but I'd suggest one of you file it as a bug
at http://lab.msdn.microsoft.com/productfeedback/
Steve Kass
Drew University
Leila wrote:
>Hi,
>I try this query:
>--
>use AdventureWorks
>go
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>go
>set statistics time on
>go
>-- try the query again
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>--
>the second query after setting "statistics time" is very slow on my
>computer. I'd like to know if anybody else has the same problem?
>Thanks in advance,
>Leila
>
>
>|||On Wed, 03 May 2006 00:00:42 -0400, Steve Kass <skass@.drew.edu> wrote:
>Leila and Roy,
>I can also reproduce this behavior. I don't have an answer
>or workaround, but I'd suggest one of you file it as a bug
>at http://lab.msdn.microsoft.com/productfeedback/
>Steve Kass
>Drew University
Yikes.
Just for the record, I've been using statistics io on a lot over the
last year or so, and on SQL2000 it generally had a small impact, maybe
5 to 10 percent.
Josh

Poor query performance with: set statistics time on (SQL2K5)

Hi,
I try this query:
--
use AdventureWorks
go
select c.*,o.* from sales.salesorderheader o join sales.customer c
on o.customerid=c.customerid
go
set statistics time on
go
-- try the query again
select c.*,o.* from sales.salesorderheader o join sales.customer c
on o.customerid=c.customerid
--
the second query after setting "statistics time" is very slow on my
computer. I'd like to know if anybody else has the same problem?
Thanks in advance,
LeilaI tested it on 2005 SP1 using Management Studio. I ran it as give,
and with the order reversed. I also added select getdate() lines to
give a measure of elapsed time. Results were returned to a grid.
With statistics time on the query took a bit more than twice as long
to run.
Roy Harvey
Beacon Falls, CT
On Wed, 3 May 2006 03:39:17 +0430, "Leila" <Leilas@.hotpop.com> wrote:

>Hi,
>I try this query:
>--
>use AdventureWorks
>go
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>go
>set statistics time on
>go
>-- try the query again
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>--
>the second query after setting "statistics time" is very slow on my
>computer. I'd like to know if anybody else has the same problem?
>Thanks in advance,
>Leila|||Leila and Roy,
I can also reproduce this behavior. I don't have an answer
or workaround, but I'd suggest one of you file it as a bug
at http://lab.msdn.microsoft.com/productfeedback/
Steve Kass
Drew University
Leila wrote:

>Hi,
>I try this query:
>--
>use AdventureWorks
>go
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>go
>set statistics time on
>go
>-- try the query again
>select c.*,o.* from sales.salesorderheader o join sales.customer c
>on o.customerid=c.customerid
>--
>the second query after setting "statistics time" is very slow on my
>computer. I'd like to know if anybody else has the same problem?
>Thanks in advance,
>Leila
>
>
>|||On Wed, 03 May 2006 00:00:42 -0400, Steve Kass <skass@.drew.edu> wrote:
>Leila and Roy,
>I can also reproduce this behavior. I don't have an answer
>or workaround, but I'd suggest one of you file it as a bug
>at http://lab.msdn.microsoft.com/productfeedback/
>Steve Kass
>Drew University
Yikes.
Just for the record, I've been using statistics io on a lot over the
last year or so, and on SQL2000 it generally had a small impact, maybe
5 to 10 percent.
Joshsql

Wednesday, March 28, 2012

Poor performance after clustered index rebuild

Hi,
On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
INTEGER with auto-increment.
For the first time this week-end, the clustered index for primary key on
this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
this table was fast. After rebuild, a simple SELECT without ORDER BY on this
table is very slow.
Why a rebuild on clustered index can result in poor performance ?
Can you help me ?
Thanks
Is the Auto-Shrink option on?
what is the output of
DBCC SHOWCONTIG (<tablename>)
WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
"shwac" wrote:

> Hi,
> On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> INTEGER with auto-increment.
> For the first time this week-end, the clustered index for primary key on
> this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> table is very slow.
> Why a rebuild on clustered index can result in poor performance ?
> Can you help me ?
> Thanks
>
>
|||Hi,
Auto-shrink option is off.
Output of DBCC (Copy/past in notepad for good presentation):
ObjectName ObjectId IndexName IndexId Level
Pages Rows MinimumRecordSize MaximumRecordSize
AverageRecordSizeForwardedRecords Extents ExtentSwitches
AverageFreeBytes AveragePageDensity ScanDensity BestCount
ActualCount LogicalFragmentation ExtentFragmentation
-- -- -- --
-- -- -- --
-- --- --
-- -- --
-- -- --
Even 117575457 PK_Even 1 0
171804 NULL NULL NULL
NULL NULL 0 21510 NULL
NULL 99.8372925479987 21476 21511 0.0
NULL
Even 117575457 IDX_Id_Unique_Even 9 0
2890 NULL NULL NULL
NULL NULL 0 362 NULL
NULL 99.724517906336089 362 363 0.0
NULL
Even 117575457 FK_Cd_Type_Appel_Even 10 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_Cd_Type_Even_Even 11 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_Cd_Direct_Even 12 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Vehi_Even 13 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_Cd_Grav_Even_Even 14 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_No_Categ_Even 15 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_No_Empl_Log_Even 16 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_Cd_Cent_Trans_Even 17 0
2059 NULL NULL NULL
NULL NULL 0 258 NULL
NULL 99.613899613899619 258 259 0.0
NULL
Even 117575457 IDX_Tourn_Horaire_Even 18 0
2823 NULL NULL NULL
NULL NULL 0 354 NULL
NULL 99.436619718309856 353 355 0.0
NULL
Even 117575457 FK_Serv_Even 19 0
2233 NULL NULL NULL
NULL NULL 0 280 NULL
NULL 99.644128113879006 280 281 0.0
NULL
Even 117575457 FK_No_Ligne_Even 20 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Empl_Init_Even 21 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_No_Ligne_Dom_Even 30 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Empl_Sign_Even 31 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
2823 NULL NULL NULL
NULL NULL 0 354 NULL
NULL 99.436619718309856 353 355 0.0
NULL
Even 117575457 IX_Hr_Fin_Even 34 0
19967 NULL NULL NULL
NULL NULL 0 2503 NULL
NULL 99.680511182108617 2496 2504 0.0
NULL
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
[vbcol=seagreen]
> Is the Auto-Shrink option on?
> what is the output of
> DBCC SHOWCONTIG (<tablename>)
> WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> "shwac" wrote:
|||Did you try DBCC INDEXDEFRAG?
"shwac" wrote:
[vbcol=seagreen]
> Hi,
> Auto-shrink option is off.
> Output of DBCC (Copy/past in notepad for good presentation):
> ObjectName ObjectId IndexName IndexId Level
> Pages Rows MinimumRecordSize MaximumRecordSize
> AverageRecordSizeForwardedRecords Extents ExtentSwitches
> AverageFreeBytes AveragePageDensity ScanDensity BestCount
> ActualCount LogicalFragmentation ExtentFragmentation
> -- -- -- --
> -- -- -- --
> -- --- --
> -- -- --
> -- -- --
> --
> Even 117575457 PK_Even 1 0
> 171804 NULL NULL NULL
> NULL NULL 0 21510 NULL
> NULL 99.8372925479987 21476 21511 0.0
> NULL
> Even 117575457 IDX_Id_Unique_Even 9 0
> 2890 NULL NULL NULL
> NULL NULL 0 362 NULL
> NULL 99.724517906336089 362 363 0.0
> NULL
> Even 117575457 FK_Cd_Type_Appel_Even 10 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_Cd_Type_Even_Even 11 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_Cd_Direct_Even 12 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Vehi_Even 13 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_Cd_Grav_Even_Even 14 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_No_Categ_Even 15 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_No_Empl_Log_Even 16 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_Cd_Cent_Trans_Even 17 0
> 2059 NULL NULL NULL
> NULL NULL 0 258 NULL
> NULL 99.613899613899619 258 259 0.0
> NULL
> Even 117575457 IDX_Tourn_Horaire_Even 18 0
> 2823 NULL NULL NULL
> NULL NULL 0 354 NULL
> NULL 99.436619718309856 353 355 0.0
> NULL
> Even 117575457 FK_Serv_Even 19 0
> 2233 NULL NULL NULL
> NULL NULL 0 280 NULL
> NULL 99.644128113879006 280 281 0.0
> NULL
> Even 117575457 FK_No_Ligne_Even 20 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Empl_Init_Even 21 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_No_Ligne_Dom_Even 30 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Empl_Sign_Even 31 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
> 2823 NULL NULL NULL
> NULL NULL 0 354 NULL
> NULL 99.436619718309856 353 355 0.0
> NULL
> Even 117575457 IX_Hr_Fin_Even 34 0
> 19967 NULL NULL NULL
> NULL NULL 0 2503 NULL
> NULL 99.680511182108617 2496 2504 0.0
> NULL
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
|||Result DBCC INDEXDEFRAG:
Pages Scanned Pages Moved Pages Removed
-- -- --
171804 0 0
I drop index and recreate it and I still have the problem:
create unique clustered index PK_Even on Even (No_Even)
with fillfactor = 10, drop_Existing
on [data]
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
[vbcol=seagreen]
> Did you try DBCC INDEXDEFRAG?
> "shwac" wrote:
|||Is there any reason why you are using:
fillfactor = 10
?
If not, I would try 90 or 80
Please refer to -> http://msdn2.microsoft.com/en-us/library/ms177459.aspx
for reference about FILL FACTOR
"shwac" wrote:
[vbcol=seagreen]
> Result DBCC INDEXDEFRAG:
> Pages Scanned Pages Moved Pages Removed
> -- -- --
> 171804 0 0
> I drop index and recreate it and I still have the problem:
> create unique clustered index PK_Even on Even (No_Even)
> with fillfactor = 10, drop_Existing
> on [data]
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
|||Hi,
I think I reverse the value for this option, I put 10 instead of 90.
Examples in Books Online are not very clear on the syntax for this command.
I will do some tests and come back to you for result.
Thanks.
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
[vbcol=seagreen]
> Is there any reason why you are using:
> fillfactor = 10
> ?
> If not, I would try 90 or 80
> Please refer to -> http://msdn2.microsoft.com/en-us/library/ms177459.aspx
> for reference about FILL FACTOR
>
> "shwac" wrote:
|||It was my problem... a bad fillfactor ! Before reindexation, the fillfactor
was 90. With DBREINDEX, the fillfactor become 10. I have a lot of table with
this case, so I will change it for all tables.
Thanks a lot for help and tips.
S.P.
"shwac" wrote:
[vbcol=seagreen]
> Hi,
> I think I reverse the value for this option, I put 10 instead of 90.
> Examples in Books Online are not very clear on the syntax for this command.
> I will do some tests and come back to you for result.
> Thanks.
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
sql

Poor performance after clustered index rebuild

Hi,
On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
INTEGER with auto-increment.
For the first time this week-end, the clustered index for primary key on
this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
this table was fast. After rebuild, a simple SELECT without ORDER BY on this
table is very slow.
Why a rebuild on clustered index can result in poor performance ?
Can you help me ?
ThanksIs the Auto-Shrink option on?
what is the output of
DBCC SHOWCONTIG (<tablename>)
WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
"shwac" wrote:
> Hi,
> On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> INTEGER with auto-increment.
> For the first time this week-end, the clustered index for primary key on
> this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> table is very slow.
> Why a rebuild on clustered index can result in poor performance ?
> Can you help me ?
> Thanks
>
>|||Hi,
Auto-shrink option is off.
Output of DBCC (Copy/past in notepad for good presentation):
ObjectName ObjectId IndexName IndexId Level
Pages Rows MinimumRecordSize MaximumRecordSize
AverageRecordSizeForwardedRecords Extents ExtentSwitches
AverageFreeBytes AveragePageDensity ScanDensity BestCount
ActualCount LogicalFragmentation ExtentFragmentation
-- -- -- --
-- -- -- --
-- --- --
-- -- --
-- -- --
--
Even 117575457 PK_Even 1 0
171804 NULL NULL NULL
NULL NULL 0 21510 NULL
NULL 99.8372925479987 21476 21511 0.0
NULL
Even 117575457 IDX_Id_Unique_Even 9 0
2890 NULL NULL NULL
NULL NULL 0 362 NULL
NULL 99.724517906336089 362 363 0.0
NULL
Even 117575457 FK_Cd_Type_Appel_Even 10 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_Cd_Type_Even_Even 11 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_Cd_Direct_Even 12 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Vehi_Even 13 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_Cd_Grav_Even_Even 14 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_No_Categ_Even 15 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_No_Empl_Log_Even 16 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_Cd_Cent_Trans_Even 17 0
2059 NULL NULL NULL
NULL NULL 0 258 NULL
NULL 99.613899613899619 258 259 0.0
NULL
Even 117575457 IDX_Tourn_Horaire_Even 18 0
2823 NULL NULL NULL
NULL NULL 0 354 NULL
NULL 99.436619718309856 353 355 0.0
NULL
Even 117575457 FK_Serv_Even 19 0
2233 NULL NULL NULL
NULL NULL 0 280 NULL
NULL 99.644128113879006 280 281 0.0
NULL
Even 117575457 FK_No_Ligne_Even 20 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Empl_Init_Even 21 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_No_Ligne_Dom_Even 30 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Empl_Sign_Even 31 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
2823 NULL NULL NULL
NULL NULL 0 354 NULL
NULL 99.436619718309856 353 355 0.0
NULL
Even 117575457 IX_Hr_Fin_Even 34 0
19967 NULL NULL NULL
NULL NULL 0 2503 NULL
NULL 99.680511182108617 2496 2504 0.0
NULL
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> Is the Auto-Shrink option on?
> what is the output of
> DBCC SHOWCONTIG (<tablename>)
> WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> "shwac" wrote:
> > Hi,
> > On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> > INTEGER with auto-increment.
> >
> > For the first time this week-end, the clustered index for primary key on
> > this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> > this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> > table is very slow.
> >
> > Why a rebuild on clustered index can result in poor performance ?
> >
> > Can you help me ?
> >
> > Thanks
> >
> >
> >
> >|||Did you try DBCC INDEXDEFRAG?
"shwac" wrote:
> Hi,
> Auto-shrink option is off.
> Output of DBCC (Copy/past in notepad for good presentation):
> ObjectName ObjectId IndexName IndexId Level
> Pages Rows MinimumRecordSize MaximumRecordSize
> AverageRecordSizeForwardedRecords Extents ExtentSwitches
> AverageFreeBytes AveragePageDensity ScanDensity BestCount
> ActualCount LogicalFragmentation ExtentFragmentation
> -- -- -- --
> -- -- -- --
> -- --- --
> -- -- --
> -- -- --
> --
> Even 117575457 PK_Even 1 0
> 171804 NULL NULL NULL
> NULL NULL 0 21510 NULL
> NULL 99.8372925479987 21476 21511 0.0
> NULL
> Even 117575457 IDX_Id_Unique_Even 9 0
> 2890 NULL NULL NULL
> NULL NULL 0 362 NULL
> NULL 99.724517906336089 362 363 0.0
> NULL
> Even 117575457 FK_Cd_Type_Appel_Even 10 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_Cd_Type_Even_Even 11 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_Cd_Direct_Even 12 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Vehi_Even 13 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_Cd_Grav_Even_Even 14 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_No_Categ_Even 15 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_No_Empl_Log_Even 16 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_Cd_Cent_Trans_Even 17 0
> 2059 NULL NULL NULL
> NULL NULL 0 258 NULL
> NULL 99.613899613899619 258 259 0.0
> NULL
> Even 117575457 IDX_Tourn_Horaire_Even 18 0
> 2823 NULL NULL NULL
> NULL NULL 0 354 NULL
> NULL 99.436619718309856 353 355 0.0
> NULL
> Even 117575457 FK_Serv_Even 19 0
> 2233 NULL NULL NULL
> NULL NULL 0 280 NULL
> NULL 99.644128113879006 280 281 0.0
> NULL
> Even 117575457 FK_No_Ligne_Even 20 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Empl_Init_Even 21 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_No_Ligne_Dom_Even 30 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Empl_Sign_Even 31 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
> 2823 NULL NULL NULL
> NULL NULL 0 354 NULL
> NULL 99.436619718309856 353 355 0.0
> NULL
> Even 117575457 IX_Hr_Fin_Even 34 0
> 19967 NULL NULL NULL
> NULL NULL 0 2503 NULL
> NULL 99.680511182108617 2496 2504 0.0
> NULL
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> > Is the Auto-Shrink option on?
> >
> > what is the output of
> >
> > DBCC SHOWCONTIG (<tablename>)
> > WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> >
> > "shwac" wrote:
> >
> > > Hi,
> > > On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> > > INTEGER with auto-increment.
> > >
> > > For the first time this week-end, the clustered index for primary key on
> > > this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> > > this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> > > table is very slow.
> > >
> > > Why a rebuild on clustered index can result in poor performance ?
> > >
> > > Can you help me ?
> > >
> > > Thanks
> > >
> > >
> > >
> > >|||Result DBCC INDEXDEFRAG:
Pages Scanned Pages Moved Pages Removed
-- -- --
171804 0 0
I drop index and recreate it and I still have the problem:
create unique clustered index PK_Even on Even (No_Even)
with fillfactor = 10, drop_Existing
on [data]
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> Did you try DBCC INDEXDEFRAG?
> "shwac" wrote:
> > Hi,
> >
> > Auto-shrink option is off.
> >
> > Output of DBCC (Copy/past in notepad for good presentation):
> >
> > ObjectName ObjectId IndexName IndexId Level
> > Pages Rows MinimumRecordSize MaximumRecordSize
> > AverageRecordSizeForwardedRecords Extents ExtentSwitches
> > AverageFreeBytes AveragePageDensity ScanDensity BestCount
> > ActualCount LogicalFragmentation ExtentFragmentation
> > -- -- -- --
> > -- -- -- --
> > -- --- --
> > -- -- --
> > -- -- --
> > --
> > Even 117575457 PK_Even 1 0
> > 171804 NULL NULL NULL
> > NULL NULL 0 21510 NULL
> > NULL 99.8372925479987 21476 21511 0.0
> > NULL
> > Even 117575457 IDX_Id_Unique_Even 9 0
> > 2890 NULL NULL NULL
> > NULL NULL 0 362 NULL
> > NULL 99.724517906336089 362 363 0.0
> > NULL
> > Even 117575457 FK_Cd_Type_Appel_Even 10 0
> > 1221 NULL NULL NULL
> > NULL NULL 0 153 NULL
> > NULL 99.350649350649363 153 154 0.0
> > NULL
> > Even 117575457 FK_Cd_Type_Even_Even 11 0
> > 1221 NULL NULL NULL
> > NULL NULL 0 153 NULL
> > NULL 99.350649350649363 153 154 0.0
> > NULL
> > Even 117575457 FK_Cd_Direct_Even 12 0
> > 1334 NULL NULL NULL
> > NULL NULL 0 167 NULL
> > NULL 99.404761904761912 167 168 0.0
> > NULL
> > Even 117575457 FK_No_Vehi_Even 13 0
> > 1555 NULL NULL NULL
> > NULL NULL 0 194 NULL
> > NULL 100.0 195 195 0.0
> > NULL
> > Even 117575457 FK_Cd_Grav_Even_Even 14 0
> > 1221 NULL NULL NULL
> > NULL NULL 0 153 NULL
> > NULL 99.350649350649363 153 154 0.0
> > NULL
> > Even 117575457 FK_No_Categ_Even 15 0
> > 1221 NULL NULL NULL
> > NULL NULL 0 153 NULL
> > NULL 99.350649350649363 153 154 0.0
> > NULL
> > Even 117575457 FK_No_Empl_Log_Even 16 0
> > 1555 NULL NULL NULL
> > NULL NULL 0 194 NULL
> > NULL 100.0 195 195 0.0
> > NULL
> > Even 117575457 FK_Cd_Cent_Trans_Even 17 0
> > 2059 NULL NULL NULL
> > NULL NULL 0 258 NULL
> > NULL 99.613899613899619 258 259 0.0
> > NULL
> > Even 117575457 IDX_Tourn_Horaire_Even 18 0
> > 2823 NULL NULL NULL
> > NULL NULL 0 354 NULL
> > NULL 99.436619718309856 353 355 0.0
> > NULL
> > Even 117575457 FK_Serv_Even 19 0
> > 2233 NULL NULL NULL
> > NULL NULL 0 280 NULL
> > NULL 99.644128113879006 280 281 0.0
> > NULL
> > Even 117575457 FK_No_Ligne_Even 20 0
> > 1334 NULL NULL NULL
> > NULL NULL 0 167 NULL
> > NULL 99.404761904761912 167 168 0.0
> > NULL
> > Even 117575457 FK_No_Empl_Init_Even 21 0
> > 1555 NULL NULL NULL
> > NULL NULL 0 194 NULL
> > NULL 100.0 195 195 0.0
> > NULL
> > Even 117575457 FK_No_Ligne_Dom_Even 30 0
> > 1334 NULL NULL NULL
> > NULL NULL 0 167 NULL
> > NULL 99.404761904761912 167 168 0.0
> > NULL
> > Even 117575457 FK_No_Empl_Sign_Even 31 0
> > 1555 NULL NULL NULL
> > NULL NULL 0 194 NULL
> > NULL 100.0 195 195 0.0
> > NULL
> > Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
> > 2823 NULL NULL NULL
> > NULL NULL 0 354 NULL
> > NULL 99.436619718309856 353 355 0.0
> > NULL
> > Even 117575457 IX_Hr_Fin_Even 34 0
> > 19967 NULL NULL NULL
> > NULL NULL 0 2503 NULL
> > NULL 99.680511182108617 2496 2504 0.0
> > NULL
> >
> >
> >
> > "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> >
> > > Is the Auto-Shrink option on?
> > >
> > > what is the output of
> > >
> > > DBCC SHOWCONTIG (<tablename>)
> > > WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> > >
> > > "shwac" wrote:
> > >
> > > > Hi,
> > > > On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> > > > INTEGER with auto-increment.
> > > >
> > > > For the first time this week-end, the clustered index for primary key on
> > > > this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> > > > this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> > > > table is very slow.
> > > >
> > > > Why a rebuild on clustered index can result in poor performance ?
> > > >
> > > > Can you help me ?
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > >|||Is there any reason why you are using:
fillfactor = 10
?
If not, I would try 90 or 80
Please refer to -> http://msdn2.microsoft.com/en-us/library/ms177459.aspx
for reference about FILL FACTOR
"shwac" wrote:
> Result DBCC INDEXDEFRAG:
> Pages Scanned Pages Moved Pages Removed
> -- -- --
> 171804 0 0
> I drop index and recreate it and I still have the problem:
> create unique clustered index PK_Even on Even (No_Even)
> with fillfactor = 10, drop_Existing
> on [data]
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> > Did you try DBCC INDEXDEFRAG?
> >
> > "shwac" wrote:
> >
> > > Hi,
> > >
> > > Auto-shrink option is off.
> > >
> > > Output of DBCC (Copy/past in notepad for good presentation):
> > >
> > > ObjectName ObjectId IndexName IndexId Level
> > > Pages Rows MinimumRecordSize MaximumRecordSize
> > > AverageRecordSizeForwardedRecords Extents ExtentSwitches
> > > AverageFreeBytes AveragePageDensity ScanDensity BestCount
> > > ActualCount LogicalFragmentation ExtentFragmentation
> > > -- -- -- --
> > > -- -- -- --
> > > -- --- --
> > > -- -- --
> > > -- -- --
> > > --
> > > Even 117575457 PK_Even 1 0
> > > 171804 NULL NULL NULL
> > > NULL NULL 0 21510 NULL
> > > NULL 99.8372925479987 21476 21511 0.0
> > > NULL
> > > Even 117575457 IDX_Id_Unique_Even 9 0
> > > 2890 NULL NULL NULL
> > > NULL NULL 0 362 NULL
> > > NULL 99.724517906336089 362 363 0.0
> > > NULL
> > > Even 117575457 FK_Cd_Type_Appel_Even 10 0
> > > 1221 NULL NULL NULL
> > > NULL NULL 0 153 NULL
> > > NULL 99.350649350649363 153 154 0.0
> > > NULL
> > > Even 117575457 FK_Cd_Type_Even_Even 11 0
> > > 1221 NULL NULL NULL
> > > NULL NULL 0 153 NULL
> > > NULL 99.350649350649363 153 154 0.0
> > > NULL
> > > Even 117575457 FK_Cd_Direct_Even 12 0
> > > 1334 NULL NULL NULL
> > > NULL NULL 0 167 NULL
> > > NULL 99.404761904761912 167 168 0.0
> > > NULL
> > > Even 117575457 FK_No_Vehi_Even 13 0
> > > 1555 NULL NULL NULL
> > > NULL NULL 0 194 NULL
> > > NULL 100.0 195 195 0.0
> > > NULL
> > > Even 117575457 FK_Cd_Grav_Even_Even 14 0
> > > 1221 NULL NULL NULL
> > > NULL NULL 0 153 NULL
> > > NULL 99.350649350649363 153 154 0.0
> > > NULL
> > > Even 117575457 FK_No_Categ_Even 15 0
> > > 1221 NULL NULL NULL
> > > NULL NULL 0 153 NULL
> > > NULL 99.350649350649363 153 154 0.0
> > > NULL
> > > Even 117575457 FK_No_Empl_Log_Even 16 0
> > > 1555 NULL NULL NULL
> > > NULL NULL 0 194 NULL
> > > NULL 100.0 195 195 0.0
> > > NULL
> > > Even 117575457 FK_Cd_Cent_Trans_Even 17 0
> > > 2059 NULL NULL NULL
> > > NULL NULL 0 258 NULL
> > > NULL 99.613899613899619 258 259 0.0
> > > NULL
> > > Even 117575457 IDX_Tourn_Horaire_Even 18 0
> > > 2823 NULL NULL NULL
> > > NULL NULL 0 354 NULL
> > > NULL 99.436619718309856 353 355 0.0
> > > NULL
> > > Even 117575457 FK_Serv_Even 19 0
> > > 2233 NULL NULL NULL
> > > NULL NULL 0 280 NULL
> > > NULL 99.644128113879006 280 281 0.0
> > > NULL
> > > Even 117575457 FK_No_Ligne_Even 20 0
> > > 1334 NULL NULL NULL
> > > NULL NULL 0 167 NULL
> > > NULL 99.404761904761912 167 168 0.0
> > > NULL
> > > Even 117575457 FK_No_Empl_Init_Even 21 0
> > > 1555 NULL NULL NULL
> > > NULL NULL 0 194 NULL
> > > NULL 100.0 195 195 0.0
> > > NULL
> > > Even 117575457 FK_No_Ligne_Dom_Even 30 0
> > > 1334 NULL NULL NULL
> > > NULL NULL 0 167 NULL
> > > NULL 99.404761904761912 167 168 0.0
> > > NULL
> > > Even 117575457 FK_No_Empl_Sign_Even 31 0
> > > 1555 NULL NULL NULL
> > > NULL NULL 0 194 NULL
> > > NULL 100.0 195 195 0.0
> > > NULL
> > > Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
> > > 2823 NULL NULL NULL
> > > NULL NULL 0 354 NULL
> > > NULL 99.436619718309856 353 355 0.0
> > > NULL
> > > Even 117575457 IX_Hr_Fin_Even 34 0
> > > 19967 NULL NULL NULL
> > > NULL NULL 0 2503 NULL
> > > NULL 99.680511182108617 2496 2504 0.0
> > > NULL
> > >
> > >
> > >
> > > "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> > >
> > > > Is the Auto-Shrink option on?
> > > >
> > > > what is the output of
> > > >
> > > > DBCC SHOWCONTIG (<tablename>)
> > > > WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> > > >
> > > > "shwac" wrote:
> > > >
> > > > > Hi,
> > > > > On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> > > > > INTEGER with auto-increment.
> > > > >
> > > > > For the first time this week-end, the clustered index for primary key on
> > > > > this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> > > > > this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> > > > > table is very slow.
> > > > >
> > > > > Why a rebuild on clustered index can result in poor performance ?
> > > > >
> > > > > Can you help me ?
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > > >
> > > > >|||Hi,
I think I reverse the value for this option, I put 10 instead of 90.
Examples in Books Online are not very clear on the syntax for this command.
I will do some tests and come back to you for result.
Thanks.
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> Is there any reason why you are using:
> fillfactor = 10
> ?
> If not, I would try 90 or 80
> Please refer to -> http://msdn2.microsoft.com/en-us/library/ms177459.aspx
> for reference about FILL FACTOR
>
> "shwac" wrote:
> > Result DBCC INDEXDEFRAG:
> >
> > Pages Scanned Pages Moved Pages Removed
> > -- -- --
> > 171804 0 0
> >
> > I drop index and recreate it and I still have the problem:
> >
> > create unique clustered index PK_Even on Even (No_Even)
> > with fillfactor = 10, drop_Existing
> > on [data]
> >
> >
> > "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> >
> > > Did you try DBCC INDEXDEFRAG?
> > >
> > > "shwac" wrote:
> > >
> > > > Hi,
> > > >
> > > > Auto-shrink option is off.
> > > >
> > > > Output of DBCC (Copy/past in notepad for good presentation):
> > > >
> > > > ObjectName ObjectId IndexName IndexId Level
> > > > Pages Rows MinimumRecordSize MaximumRecordSize
> > > > AverageRecordSizeForwardedRecords Extents ExtentSwitches
> > > > AverageFreeBytes AveragePageDensity ScanDensity BestCount
> > > > ActualCount LogicalFragmentation ExtentFragmentation
> > > > -- -- -- --
> > > > -- -- -- --
> > > > -- --- --
> > > > -- -- --
> > > > -- -- --
> > > > --
> > > > Even 117575457 PK_Even 1 0
> > > > 171804 NULL NULL NULL
> > > > NULL NULL 0 21510 NULL
> > > > NULL 99.8372925479987 21476 21511 0.0
> > > > NULL
> > > > Even 117575457 IDX_Id_Unique_Even 9 0
> > > > 2890 NULL NULL NULL
> > > > NULL NULL 0 362 NULL
> > > > NULL 99.724517906336089 362 363 0.0
> > > > NULL
> > > > Even 117575457 FK_Cd_Type_Appel_Even 10 0
> > > > 1221 NULL NULL NULL
> > > > NULL NULL 0 153 NULL
> > > > NULL 99.350649350649363 153 154 0.0
> > > > NULL
> > > > Even 117575457 FK_Cd_Type_Even_Even 11 0
> > > > 1221 NULL NULL NULL
> > > > NULL NULL 0 153 NULL
> > > > NULL 99.350649350649363 153 154 0.0
> > > > NULL
> > > > Even 117575457 FK_Cd_Direct_Even 12 0
> > > > 1334 NULL NULL NULL
> > > > NULL NULL 0 167 NULL
> > > > NULL 99.404761904761912 167 168 0.0
> > > > NULL
> > > > Even 117575457 FK_No_Vehi_Even 13 0
> > > > 1555 NULL NULL NULL
> > > > NULL NULL 0 194 NULL
> > > > NULL 100.0 195 195 0.0
> > > > NULL
> > > > Even 117575457 FK_Cd_Grav_Even_Even 14 0
> > > > 1221 NULL NULL NULL
> > > > NULL NULL 0 153 NULL
> > > > NULL 99.350649350649363 153 154 0.0
> > > > NULL
> > > > Even 117575457 FK_No_Categ_Even 15 0
> > > > 1221 NULL NULL NULL
> > > > NULL NULL 0 153 NULL
> > > > NULL 99.350649350649363 153 154 0.0
> > > > NULL
> > > > Even 117575457 FK_No_Empl_Log_Even 16 0
> > > > 1555 NULL NULL NULL
> > > > NULL NULL 0 194 NULL
> > > > NULL 100.0 195 195 0.0
> > > > NULL
> > > > Even 117575457 FK_Cd_Cent_Trans_Even 17 0
> > > > 2059 NULL NULL NULL
> > > > NULL NULL 0 258 NULL
> > > > NULL 99.613899613899619 258 259 0.0
> > > > NULL
> > > > Even 117575457 IDX_Tourn_Horaire_Even 18 0
> > > > 2823 NULL NULL NULL
> > > > NULL NULL 0 354 NULL
> > > > NULL 99.436619718309856 353 355 0.0
> > > > NULL
> > > > Even 117575457 FK_Serv_Even 19 0
> > > > 2233 NULL NULL NULL
> > > > NULL NULL 0 280 NULL
> > > > NULL 99.644128113879006 280 281 0.0
> > > > NULL
> > > > Even 117575457 FK_No_Ligne_Even 20 0
> > > > 1334 NULL NULL NULL
> > > > NULL NULL 0 167 NULL
> > > > NULL 99.404761904761912 167 168 0.0
> > > > NULL
> > > > Even 117575457 FK_No_Empl_Init_Even 21 0
> > > > 1555 NULL NULL NULL
> > > > NULL NULL 0 194 NULL
> > > > NULL 100.0 195 195 0.0
> > > > NULL
> > > > Even 117575457 FK_No_Ligne_Dom_Even 30 0
> > > > 1334 NULL NULL NULL
> > > > NULL NULL 0 167 NULL
> > > > NULL 99.404761904761912 167 168 0.0
> > > > NULL
> > > > Even 117575457 FK_No_Empl_Sign_Even 31 0
> > > > 1555 NULL NULL NULL
> > > > NULL NULL 0 194 NULL
> > > > NULL 100.0 195 195 0.0
> > > > NULL
> > > > Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
> > > > 2823 NULL NULL NULL
> > > > NULL NULL 0 354 NULL
> > > > NULL 99.436619718309856 353 355 0.0
> > > > NULL
> > > > Even 117575457 IX_Hr_Fin_Even 34 0
> > > > 19967 NULL NULL NULL
> > > > NULL NULL 0 2503 NULL
> > > > NULL 99.680511182108617 2496 2504 0.0
> > > > NULL
> > > >
> > > >
> > > >
> > > > "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> > > >
> > > > > Is the Auto-Shrink option on?
> > > > >
> > > > > what is the output of
> > > > >
> > > > > DBCC SHOWCONTIG (<tablename>)
> > > > > WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> > > > >
> > > > > "shwac" wrote:
> > > > >
> > > > > > Hi,
> > > > > > On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> > > > > > INTEGER with auto-increment.
> > > > > >
> > > > > > For the first time this week-end, the clustered index for primary key on
> > > > > > this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> > > > > > this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> > > > > > table is very slow.
> > > > > >
> > > > > > Why a rebuild on clustered index can result in poor performance ?
> > > > > >
> > > > > > Can you help me ?
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > > > >|||It was my problem... a bad fillfactor ! Before reindexation, the fillfactor
was 90. With DBREINDEX, the fillfactor become 10. I have a lot of table with
this case, so I will change it for all tables.
Thanks a lot for help and tips.
S.P.
"shwac" wrote:
> Hi,
> I think I reverse the value for this option, I put 10 instead of 90.
> Examples in Books Online are not very clear on the syntax for this command.
> I will do some tests and come back to you for result.
> Thanks.
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> > Is there any reason why you are using:
> >
> > fillfactor = 10
> >
> > ?
> >
> > If not, I would try 90 or 80
> >
> > Please refer to -> http://msdn2.microsoft.com/en-us/library/ms177459.aspx
> > for reference about FILL FACTOR
> >
> >
> > "shwac" wrote:
> >
> > > Result DBCC INDEXDEFRAG:
> > >
> > > Pages Scanned Pages Moved Pages Removed
> > > -- -- --
> > > 171804 0 0
> > >
> > > I drop index and recreate it and I still have the problem:
> > >
> > > create unique clustered index PK_Even on Even (No_Even)
> > > with fillfactor = 10, drop_Existing
> > > on [data]
> > >
> > >
> > > "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> > >
> > > > Did you try DBCC INDEXDEFRAG?
> > > >
> > > > "shwac" wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Auto-shrink option is off.
> > > > >
> > > > > Output of DBCC (Copy/past in notepad for good presentation):
> > > > >
> > > > > ObjectName ObjectId IndexName IndexId Level
> > > > > Pages Rows MinimumRecordSize MaximumRecordSize
> > > > > AverageRecordSizeForwardedRecords Extents ExtentSwitches
> > > > > AverageFreeBytes AveragePageDensity ScanDensity BestCount
> > > > > ActualCount LogicalFragmentation ExtentFragmentation
> > > > > -- -- -- --
> > > > > -- -- -- --
> > > > > -- --- --
> > > > > -- -- --
> > > > > -- -- --
> > > > > --
> > > > > Even 117575457 PK_Even 1 0
> > > > > 171804 NULL NULL NULL
> > > > > NULL NULL 0 21510 NULL
> > > > > NULL 99.8372925479987 21476 21511 0.0
> > > > > NULL
> > > > > Even 117575457 IDX_Id_Unique_Even 9 0
> > > > > 2890 NULL NULL NULL
> > > > > NULL NULL 0 362 NULL
> > > > > NULL 99.724517906336089 362 363 0.0
> > > > > NULL
> > > > > Even 117575457 FK_Cd_Type_Appel_Even 10 0
> > > > > 1221 NULL NULL NULL
> > > > > NULL NULL 0 153 NULL
> > > > > NULL 99.350649350649363 153 154 0.0
> > > > > NULL
> > > > > Even 117575457 FK_Cd_Type_Even_Even 11 0
> > > > > 1221 NULL NULL NULL
> > > > > NULL NULL 0 153 NULL
> > > > > NULL 99.350649350649363 153 154 0.0
> > > > > NULL
> > > > > Even 117575457 FK_Cd_Direct_Even 12 0
> > > > > 1334 NULL NULL NULL
> > > > > NULL NULL 0 167 NULL
> > > > > NULL 99.404761904761912 167 168 0.0
> > > > > NULL
> > > > > Even 117575457 FK_No_Vehi_Even 13 0
> > > > > 1555 NULL NULL NULL
> > > > > NULL NULL 0 194 NULL
> > > > > NULL 100.0 195 195 0.0
> > > > > NULL
> > > > > Even 117575457 FK_Cd_Grav_Even_Even 14 0
> > > > > 1221 NULL NULL NULL
> > > > > NULL NULL 0 153 NULL
> > > > > NULL 99.350649350649363 153 154 0.0
> > > > > NULL
> > > > > Even 117575457 FK_No_Categ_Even 15 0
> > > > > 1221 NULL NULL NULL
> > > > > NULL NULL 0 153 NULL
> > > > > NULL 99.350649350649363 153 154 0.0
> > > > > NULL
> > > > > Even 117575457 FK_No_Empl_Log_Even 16 0
> > > > > 1555 NULL NULL NULL
> > > > > NULL NULL 0 194 NULL
> > > > > NULL 100.0 195 195 0.0
> > > > > NULL
> > > > > Even 117575457 FK_Cd_Cent_Trans_Even 17 0
> > > > > 2059 NULL NULL NULL
> > > > > NULL NULL 0 258 NULL
> > > > > NULL 99.613899613899619 258 259 0.0
> > > > > NULL
> > > > > Even 117575457 IDX_Tourn_Horaire_Even 18 0
> > > > > 2823 NULL NULL NULL
> > > > > NULL NULL 0 354 NULL
> > > > > NULL 99.436619718309856 353 355 0.0
> > > > > NULL
> > > > > Even 117575457 FK_Serv_Even 19 0
> > > > > 2233 NULL NULL NULL
> > > > > NULL NULL 0 280 NULL
> > > > > NULL 99.644128113879006 280 281 0.0
> > > > > NULL
> > > > > Even 117575457 FK_No_Ligne_Even 20 0
> > > > > 1334 NULL NULL NULL
> > > > > NULL NULL 0 167 NULL
> > > > > NULL 99.404761904761912 167 168 0.0
> > > > > NULL
> > > > > Even 117575457 FK_No_Empl_Init_Even 21 0
> > > > > 1555 NULL NULL NULL
> > > > > NULL NULL 0 194 NULL
> > > > > NULL 100.0 195 195 0.0
> > > > > NULL
> > > > > Even 117575457 FK_No_Ligne_Dom_Even 30 0
> > > > > 1334 NULL NULL NULL
> > > > > NULL NULL 0 167 NULL
> > > > > NULL 99.404761904761912 167 168 0.0
> > > > > NULL
> > > > > Even 117575457 FK_No_Empl_Sign_Even 31 0
> > > > > 1555 NULL NULL NULL
> > > > > NULL NULL 0 194 NULL
> > > > > NULL 100.0 195 195 0.0
> > > > > NULL
> > > > > Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
> > > > > 2823 NULL NULL NULL
> > > > > NULL NULL 0 354 NULL
> > > > > NULL 99.436619718309856 353 355 0.0
> > > > > NULL
> > > > > Even 117575457 IX_Hr_Fin_Even 34 0
> > > > > 19967 NULL NULL NULL
> > > > > NULL NULL 0 2503 NULL
> > > > > NULL 99.680511182108617 2496 2504 0.0
> > > > > NULL
> > > > >
> > > > >
> > > > >
> > > > > "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
> > > > >
> > > > > > Is the Auto-Shrink option on?
> > > > > >
> > > > > > what is the output of
> > > > > >
> > > > > > DBCC SHOWCONTIG (<tablename>)
> > > > > > WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> > > > > >
> > > > > > "shwac" wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > > On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
> > > > > > > INTEGER with auto-increment.
> > > > > > >
> > > > > > > For the first time this week-end, the clustered index for primary key on
> > > > > > > this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> > > > > > > this table was fast. After rebuild, a simple SELECT without ORDER BY on this
> > > > > > > table is very slow.
> > > > > > >
> > > > > > > Why a rebuild on clustered index can result in poor performance ?
> > > > > > >
> > > > > > > Can you help me ?
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >

Poor performance after clustered index rebuild

Hi,
On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is a
INTEGER with auto-increment.
For the first time this week-end, the clustered index for primary key on
this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
this table was fast. After rebuild, a simple SELECT without ORDER BY on this
table is very slow.
Why a rebuild on clustered index can result in poor performance ?
Can you help me ?
ThanksIs the Auto-Shrink option on?
what is the output of
DBCC SHOWCONTIG (<tablename> )
WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
"shwac" wrote:

> Hi,
> On SQL SERVER 2000 SP4, I have a table with 1 013 000 rows. Primary key is
a
> INTEGER with auto-increment.
> For the first time this week-end, the clustered index for primary key on
> this table has been rebuild (DBCC DBREINDEX). Before rebuild, all query on
> this table was fast. After rebuild, a simple SELECT without ORDER BY on th
is
> table is very slow.
> Why a rebuild on clustered index can result in poor performance ?
> Can you help me ?
> Thanks
>
>|||Hi,
Auto-shrink option is off.
Output of DBCC (Copy/past in notepad for good presentation):
ObjectName ObjectId IndexName IndexId Level
Pages Rows MinimumRecordSize MaximumRecordSize
AverageRecordSizeForwardedRecords Extents ExtentSwitches
AverageFreeBytes AveragePageDensity ScanDensity BestCount
ActualCount LogicalFragmentation ExtentFragmentation
-- -- -- --
-- -- -- --
-- --- --
-- -- --
-- -- --
--
Even 117575457 PK_Even 1 0
171804 NULL NULL NULL
NULL NULL 0 21510 NULL
NULL 99.8372925479987 21476 21511 0.0
NULL
Even 117575457 IDX_Id_Unique_Even 9 0
2890 NULL NULL NULL
NULL NULL 0 362 NULL
NULL 99.724517906336089 362 363 0.0
NULL
Even 117575457 FK_Cd_Type_Appel_Even 10 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_Cd_Type_Even_Even 11 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_Cd_Direct_Even 12 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Vehi_Even 13 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_Cd_Grav_Even_Even 14 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_No_Categ_Even 15 0
1221 NULL NULL NULL
NULL NULL 0 153 NULL
NULL 99.350649350649363 153 154 0.0
NULL
Even 117575457 FK_No_Empl_Log_Even 16 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_Cd_Cent_Trans_Even 17 0
2059 NULL NULL NULL
NULL NULL 0 258 NULL
NULL 99.613899613899619 258 259 0.0
NULL
Even 117575457 IDX_Tourn_Horaire_Even 18 0
2823 NULL NULL NULL
NULL NULL 0 354 NULL
NULL 99.436619718309856 353 355 0.0
NULL
Even 117575457 FK_Serv_Even 19 0
2233 NULL NULL NULL
NULL NULL 0 280 NULL
NULL 99.644128113879006 280 281 0.0
NULL
Even 117575457 FK_No_Ligne_Even 20 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Empl_Init_Even 21 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 FK_No_Ligne_Dom_Even 30 0
1334 NULL NULL NULL
NULL NULL 0 167 NULL
NULL 99.404761904761912 167 168 0.0
NULL
Even 117575457 FK_No_Empl_Sign_Even 31 0
1555 NULL NULL NULL
NULL NULL 0 194 NULL
NULL 100.0 195 195 0.0
NULL
Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
2823 NULL NULL NULL
NULL NULL 0 354 NULL
NULL 99.436619718309856 353 355 0.0
NULL
Even 117575457 IX_Hr_Fin_Even 34 0
19967 NULL NULL NULL
NULL NULL 0 2503 NULL
NULL 99.680511182108617 2496 2504 0.0
NULL
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
[vbcol=seagreen]
> Is the Auto-Shrink option on?
> what is the output of
> DBCC SHOWCONTIG (<tablename> )
> WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
> "shwac" wrote:
>|||Did you try DBCC INDEXDEFRAG?
"shwac" wrote:
[vbcol=seagreen]
> Hi,
> Auto-shrink option is off.
> Output of DBCC (Copy/past in notepad for good presentation):
> ObjectName ObjectId IndexName IndexId Level
> Pages Rows MinimumRecordSize MaximumRecordSize
> AverageRecordSizeForwardedRecords Extents ExtentSwitches
> AverageFreeBytes AveragePageDensity ScanDensity BestCount
> ActualCount LogicalFragmentation ExtentFragmentation
> -- -- -- --
> -- -- -- --
> -- --- --
> -- -- --
> -- -- --
> --
> Even 117575457 PK_Even 1 0
> 171804 NULL NULL NULL
> NULL NULL 0 21510 NULL
> NULL 99.8372925479987 21476 21511 0.0
> NULL
> Even 117575457 IDX_Id_Unique_Even 9 0
> 2890 NULL NULL NULL
> NULL NULL 0 362 NULL
> NULL 99.724517906336089 362 363 0.0
> NULL
> Even 117575457 FK_Cd_Type_Appel_Even 10 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_Cd_Type_Even_Even 11 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_Cd_Direct_Even 12 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Vehi_Even 13 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_Cd_Grav_Even_Even 14 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_No_Categ_Even 15 0
> 1221 NULL NULL NULL
> NULL NULL 0 153 NULL
> NULL 99.350649350649363 153 154 0.0
> NULL
> Even 117575457 FK_No_Empl_Log_Even 16 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_Cd_Cent_Trans_Even 17 0
> 2059 NULL NULL NULL
> NULL NULL 0 258 NULL
> NULL 99.613899613899619 258 259 0.0
> NULL
> Even 117575457 IDX_Tourn_Horaire_Even 18 0
> 2823 NULL NULL NULL
> NULL NULL 0 354 NULL
> NULL 99.436619718309856 353 355 0.0
> NULL
> Even 117575457 FK_Serv_Even 19 0
> 2233 NULL NULL NULL
> NULL NULL 0 280 NULL
> NULL 99.644128113879006 280 281 0.0
> NULL
> Even 117575457 FK_No_Ligne_Even 20 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Empl_Init_Even 21 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 FK_No_Ligne_Dom_Even 30 0
> 1334 NULL NULL NULL
> NULL NULL 0 167 NULL
> NULL 99.404761904761912 167 168 0.0
> NULL
> Even 117575457 FK_No_Empl_Sign_Even 31 0
> 1555 NULL NULL NULL
> NULL NULL 0 194 NULL
> NULL 100.0 195 195 0.0
> NULL
> Even 117575457 IX_Tourn_Horaire_Ligne_Dom_Even 32 0
> 2823 NULL NULL NULL
> NULL NULL 0 354 NULL
> NULL 99.436619718309856 353 355 0.0
> NULL
> Even 117575457 IX_Hr_Fin_Even 34 0
> 19967 NULL NULL NULL
> NULL NULL 0 2503 NULL
> NULL 99.680511182108617 2496 2504 0.0
> NULL
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
>|||Result DBCC INDEXDEFRAG:
Pages Scanned Pages Moved Pages Removed
-- -- --
171804 0 0
I drop index and recreate it and I still have the problem:
create unique clustered index PK_Even on Even (No_Even)
with fillfactor = 10, drop_Existing
on [data]
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
[vbcol=seagreen]
> Did you try DBCC INDEXDEFRAG?
> "shwac" wrote:
>|||Is there any reason why you are using:
fillfactor = 10
?
If not, I would try 90 or 80
Please refer to -> http://msdn2.microsoft.com/en-us/library/ms177459.aspx
for reference about FILL FACTOR
"shwac" wrote:
[vbcol=seagreen]
> Result DBCC INDEXDEFRAG:
> Pages Scanned Pages Moved Pages Removed
> -- -- --
> 171804 0 0
> I drop index and recreate it and I still have the problem:
> create unique clustered index PK_Even on Even (No_Even)
> with fillfactor = 10, drop_Existing
> on [data]
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
>|||Hi,
I think I reverse the value for this option, I put 10 instead of 90.
Examples in Books Online are not very clear on the syntax for this command.
I will do some tests and come back to you for result.
Thanks.
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
[vbcol=seagreen]
> Is there any reason why you are using:
> fillfactor = 10
> ?
> If not, I would try 90 or 80
> Please refer to -> http://msdn2.microsoft.com/en-us/library/ms177459.aspx
> for reference about FILL FACTOR
>
> "shwac" wrote:
>|||It was my problem... a bad fillfactor ! Before reindexation, the fillfactor
was 90. With DBREINDEX, the fillfactor become 10. I have a lot of table with
this case, so I will change it for all tables.
Thanks a lot for help and tips.
S.P.
"shwac" wrote:
[vbcol=seagreen]
> Hi,
> I think I reverse the value for this option, I put 10 instead of 90.
> Examples in Books Online are not very clear on the syntax for this command
.
> I will do some tests and come back to you for result.
> Thanks.
>
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA" wrote:
>

Monday, March 26, 2012

Pooling issues

We have been fighting with this for some time now. The web group keeps
setting the max connections in their connection strings to "2500" yes you
read that correct....that seems a little insane. BUT, we've witnesses the
site stop working when they lower it. The behavior we are seeing would
point at the pool manager not queuing requests and servicing them properly
when a connection becomes available.
Watching the activity monitor in SQL2005 we rarely see more than 5-6
connections in a runnable state. Although there are many more sleeping.
All the code in the web apps and webservices has been exhaustively gone over
to ensure connections are being released and in a timely manner. What else
could we be missing?OK so sleeping processes are only waiting for locks and are actually
busy....I misready something there. BUT why do some of these show wait
times of zero when the last batch value is sometimes a day ago? If it
hasn't run something since yesterday shouldn't the connection be gone by
now?
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23zJKeBrbGHA.3908@.TK2MSFTNGP02.phx.gbl...
> We have been fighting with this for some time now. The web group keeps
> setting the max connections in their connection strings to "2500" yes you
> read that correct....that seems a little insane. BUT, we've witnesses
> the site stop working when they lower it. The behavior we are seeing
> would point at the pool manager not queuing requests and servicing them
> properly when a connection becomes available.
> Watching the activity monitor in SQL2005 we rarely see more than 5-6
> connections in a runnable state. Although there are many more sleeping.
> All the code in the web apps and webservices has been exhaustively gone
> over to ensure connections are being released and in a timely manner.
> What else could we be missing?
>|||A connection will not disappear unless the application terminates the
connection. So, if the application that issued the batch several days ago
is still hanging around without anything to do, it is still going to have a
connection to your server.
You have a problem with your connection pool settings and management. I've
worked on websites that are servicing over 1 million CONCURRENT users with
database requests and they have their pools set to 15.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23MprjJrbGHA.2068@.TK2MSFTNGP02.phx.gbl...
> OK so sleeping processes are only waiting for locks and are actually
> busy....I misready something there. BUT why do some of these show wait
> times of zero when the last batch value is sometimes a day ago? If it
> hasn't run something since yesterday shouldn't the connection be gone by
> now?
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23zJKeBrbGHA.3908@.TK2MSFTNGP02.phx.gbl...
>|||"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:O8kKlhrbGHA.1264@.TK2MSFTNGP05.phx.gbl...
>A connection will not disappear unless the application terminates the
>connection. So, if the application that issued the batch several days ago
>is still hanging around without anything to do, it is still going to have a
>connection to your server.
> You have a problem with your connection pool settings and management.
> I've worked on websites that are servicing over 1 million CONCURRENT users
> with database requests and they have their pools set to 15.
This is what I keep hearing...though I haven't heard any ideas on how to
get there. I'm nearly 100% sure we are not leaking connections. But the
webservices choke and quit responding when the pool size is reduced. It
doesn't even seem to queue requests for the timeout period.....just stops
responding altogether.

> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23MprjJrbGHA.2068@.TK2MSFTNGP02.phx.gbl...
>|||Is that with authentication being unique per user? Or with a common user
throughout the website? I could certainly believe that with a unique user
authentication scenario but if everyone hitting that site is being connected
with the same credentials then I can't see how 15 connections would ever
service all 1 million people. Call me skeptic, (and new to this) but that
is hard to accept. I knew we had a problem but dang, you make me want to
cry .....
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:O8kKlhrbGHA.1264@.TK2MSFTNGP05.phx.gbl...
>A connection will not disappear unless the application terminates the
>connection. So, if the application that issued the batch several days ago
>is still hanging around without anything to do, it is still going to have a
>connection to your server.
> You have a problem with your connection pool settings and management.
> I've worked on websites that are servicing over 1 million CONCURRENT users
> with database requests and they have their pools set to 15.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23MprjJrbGHA.2068@.TK2MSFTNGP02.phx.gbl...
>

Pooling issues

We have been fighting with this for some time now. The web group keeps
setting the max connections in their connection strings to "2500" yes you
read that correct....that seems a little insane. BUT, we've witnesses the
site stop working when they lower it. The behavior we are seeing would
point at the pool manager not queuing requests and servicing them properly
when a connection becomes available.
Watching the activity monitor in SQL2005 we rarely see more than 5-6
connections in a runnable state. Although there are many more sleeping.
All the code in the web apps and webservices has been exhaustively gone over
to ensure connections are being released and in a timely manner. What else
could we be missing?OK so sleeping processes are only waiting for locks and are actually
busy....I misready something there. BUT why do some of these show wait
times of zero when the last batch value is sometimes a day ago? If it
hasn't run something since yesterday shouldn't the connection be gone by
now?
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23zJKeBrbGHA.3908@.TK2MSFTNGP02.phx.gbl...
> We have been fighting with this for some time now. The web group keeps
> setting the max connections in their connection strings to "2500" yes you
> read that correct....that seems a little insane. BUT, we've witnesses
> the site stop working when they lower it. The behavior we are seeing
> would point at the pool manager not queuing requests and servicing them
> properly when a connection becomes available.
> Watching the activity monitor in SQL2005 we rarely see more than 5-6
> connections in a runnable state. Although there are many more sleeping.
> All the code in the web apps and webservices has been exhaustively gone
> over to ensure connections are being released and in a timely manner.
> What else could we be missing?
>|||A connection will not disappear unless the application terminates the
connection. So, if the application that issued the batch several days ago
is still hanging around without anything to do, it is still going to have a
connection to your server.
You have a problem with your connection pool settings and management. I've
worked on websites that are servicing over 1 million CONCURRENT users with
database requests and they have their pools set to 15.
--
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23MprjJrbGHA.2068@.TK2MSFTNGP02.phx.gbl...
> OK so sleeping processes are only waiting for locks and are actually
> busy....I misready something there. BUT why do some of these show wait
> times of zero when the last batch value is sometimes a day ago? If it
> hasn't run something since yesterday shouldn't the connection be gone by
> now?
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23zJKeBrbGHA.3908@.TK2MSFTNGP02.phx.gbl...
>> We have been fighting with this for some time now. The web group keeps
>> setting the max connections in their connection strings to "2500" yes you
>> read that correct....that seems a little insane. BUT, we've witnesses
>> the site stop working when they lower it. The behavior we are seeing
>> would point at the pool manager not queuing requests and servicing them
>> properly when a connection becomes available.
>> Watching the activity monitor in SQL2005 we rarely see more than 5-6
>> connections in a runnable state. Although there are many more sleeping.
>> All the code in the web apps and webservices has been exhaustively gone
>> over to ensure connections are being released and in a timely manner.
>> What else could we be missing?
>|||"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:O8kKlhrbGHA.1264@.TK2MSFTNGP05.phx.gbl...
>A connection will not disappear unless the application terminates the
>connection. So, if the application that issued the batch several days ago
>is still hanging around without anything to do, it is still going to have a
>connection to your server.
> You have a problem with your connection pool settings and management.
> I've worked on websites that are servicing over 1 million CONCURRENT users
> with database requests and they have their pools set to 15.
This is what I keep hearing...though I haven't heard any ideas on how to
get there. I'm nearly 100% sure we are not leaking connections. But the
webservices choke and quit responding when the pool size is reduced. It
doesn't even seem to queue requests for the timeout period.....just stops
responding altogether.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23MprjJrbGHA.2068@.TK2MSFTNGP02.phx.gbl...
>> OK so sleeping processes are only waiting for locks and are actually
>> busy....I misready something there. BUT why do some of these show wait
>> times of zero when the last batch value is sometimes a day ago? If it
>> hasn't run something since yesterday shouldn't the connection be gone by
>> now?
>>
>> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
>> news:%23zJKeBrbGHA.3908@.TK2MSFTNGP02.phx.gbl...
>> We have been fighting with this for some time now. The web group keeps
>> setting the max connections in their connection strings to "2500" yes
>> you read that correct....that seems a little insane. BUT, we've
>> witnesses the site stop working when they lower it. The behavior we are
>> seeing would point at the pool manager not queuing requests and
>> servicing them properly when a connection becomes available.
>> Watching the activity monitor in SQL2005 we rarely see more than 5-6
>> connections in a runnable state. Although there are many more sleeping.
>> All the code in the web apps and webservices has been exhaustively gone
>> over to ensure connections are being released and in a timely manner.
>> What else could we be missing?
>>
>|||Is that with authentication being unique per user? Or with a common user
throughout the website? I could certainly believe that with a unique user
authentication scenario but if everyone hitting that site is being connected
with the same credentials then I can't see how 15 connections would ever
service all 1 million people. Call me skeptic, (and new to this) but that
is hard to accept. I knew we had a problem but dang, you make me want to
cry :) .....
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:O8kKlhrbGHA.1264@.TK2MSFTNGP05.phx.gbl...
>A connection will not disappear unless the application terminates the
>connection. So, if the application that issued the batch several days ago
>is still hanging around without anything to do, it is still going to have a
>connection to your server.
> You have a problem with your connection pool settings and management.
> I've worked on websites that are servicing over 1 million CONCURRENT users
> with database requests and they have their pools set to 15.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23MprjJrbGHA.2068@.TK2MSFTNGP02.phx.gbl...
>> OK so sleeping processes are only waiting for locks and are actually
>> busy....I misready something there. BUT why do some of these show wait
>> times of zero when the last batch value is sometimes a day ago? If it
>> hasn't run something since yesterday shouldn't the connection be gone by
>> now?
>>
>> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
>> news:%23zJKeBrbGHA.3908@.TK2MSFTNGP02.phx.gbl...
>> We have been fighting with this for some time now. The web group keeps
>> setting the max connections in their connection strings to "2500" yes
>> you read that correct....that seems a little insane. BUT, we've
>> witnesses the site stop working when they lower it. The behavior we are
>> seeing would point at the pool manager not queuing requests and
>> servicing them properly when a connection becomes available.
>> Watching the activity monitor in SQL2005 we rarely see more than 5-6
>> connections in a runnable state. Although there are many more sleeping.
>> All the code in the web apps and webservices has been exhaustively gone
>> over to ensure connections are being released and in a timely manner.
>> What else could we be missing?
>>
>sql

ponit in time restore

We need to do a point in time restore to 03:44 on
24/05/2004 and we have the following backups:
FULL 14:00
Hi,
POINT_IN_TIME restore will work only if your Recovery mode is FULL for that
database.
If it is FULL then:-
1. Take a backup transaction log in current database
2. Create a new database
3. Restore with full backup file with NORECOVERY (Use below command)
RESTORE database new_dbname from disk='file' with NORECOVERY, MOve
'logical_mdf' to 'physical_mdf',
move 'logical_ldf' to 'physical_ldf'
4. Restore the transaction log backup taken in step-1 with RECOVERY and
STOPAT option
RESTORE log new_dbname from disk='tran_backup_file' with RECOVERY, STOPAT
= ''May 24, 2004 03:44 AM'
Thanks
Hari
MCDBA
"John" <anonymous@.discussions.microsoft.com> wrote in message
news:1222f01c44265$de1f7470$a101280a@.phx.gbl...
> We need to do a point in time restore to 03:44 on
> 24/05/2004 and we have the following backups:
> FULL 14:00

ponit in time restore

We need to do a point in time restore to 03:44 on
24/05/2004 and we have the following backups:
FULL 14:00Hi,
POINT_IN_TIME restore will work only if your Recovery mode is FULL for that
database.
If it is FULL then:-
1. Take a backup transaction log in current database
2. Create a new database
3. Restore with full backup file with NORECOVERY (Use below command)
RESTORE database new_dbname from disk='file' with NORECOVERY, MOve
'logical_mdf' to 'physical_mdf',
move 'logical_ldf' to 'physical_ldf'
4. Restore the transaction log backup taken in step-1 with RECOVERY and
STOPAT option
RESTORE log new_dbname from disk='tran_backup_file' with RECOVERY, STOPAT
= ''May 24, 2004 03:44 AM'
Thanks
Hari
MCDBA
"John" <anonymous@.discussions.microsoft.com> wrote in message
news:1222f01c44265$de1f7470$a101280a@.phx.gbl...
> We need to do a point in time restore to 03:44 on
> 24/05/2004 and we have the following backups:
> FULL 14:00

ponit in time restore

We need to do a point in time restore to 03:44 on
24/05/2004 and we have the following backups:
FULL 14:00Hi,
POINT_IN_TIME restore will work only if your Recovery mode is FULL for that
database.
If it is FULL then:-
1. Take a backup transaction log in current database
2. Create a new database
3. Restore with full backup file with NORECOVERY (Use below command)
RESTORE database new_dbname from disk='file' with NORECOVERY, MOve
'logical_mdf' to 'physical_mdf',
move 'logical_ldf' to 'physical_ldf'
4. Restore the transaction log backup taken in step-1 with RECOVERY and
STOPAT option
RESTORE log new_dbname from disk='tran_backup_file' with RECOVERY, STOPAT
= ''May 24, 2004 03:44 AM'
Thanks
Hari
MCDBA
"John" <anonymous@.discussions.microsoft.com> wrote in message
news:1222f01c44265$de1f7470$a101280a@.phx
.gbl...
> We need to do a point in time restore to 03:44 on
> 24/05/2004 and we have the following backups:
> FULL 14:00sql

Friday, March 23, 2012

Point-In-Time Restoration Issue

Hello,

I'm testing "Point In Time" restoration for my system using both Database & Log backup files. (Database backup once a day; Log backup every 4 hours)

When I use T-SQL to perfrom the restoration, I can specify one .BAK file with numerous .TRN files and restore to any 'point of time' with no issue.

However, if I use EM to perform the same restoration, I can only specify one .BAK file with a maximum of two .TRN files (although I can see all the .TRN files) in order to restore the database properly. If I specify more .TRN files, after restoration, my DB will be in 'LOADING' status and can't be used.

Does anyone encounter the same problem before and know what is going on?

Thank You.When restoring a database with Enterprise Manager, make sure the 'Leave Database Operational' is checked.|||you can also always switch the database from "Loading" to "operational" modes with simple tsql command

restore database <Dbname> with recovery

simas|||hi guys,

thanks for the replies. I'll look into it.

btw, I did found out some documentation that closely describe my problem, it's "Microsoft Knowledge Base Article - 319697, FIX: SQL Enterprise Manager Restore to Point in Time Does Not Stop at Requested Time and the Database is Left in a Loading State"

Seems like it's not something new...

Thank You.

Point of time Recovery EM

We have been testing point of time recovery using EM and found that this does not work.
We enter date and time and do net get the logs restored. Even if we use the default date it does not work. In Query Analyser we have have managed to recover to a point in time. Anybody got any idea why EM does not work.
We are using 2000 sp3What was the sequence in EM?|||We asked fro restore and had backup and three log backups detailed the point in time was on last log so highlighted all backups and logs and select point of time and chose date whcuh was current day and amended time and clicked restore sequence show ed each backuop being restored as it should be it did not work

Point Label Properties

I have a stacked barchart with point labels applied. For some time periods
some of the values are zero. When this occurs, the zero lables stack up at
the bottom of the chart and appear very unattractive. Is there a way I can
conditionally format the point labels so that they only show if greater than
zero'Try ### in the format code box (number of #'s = max digits of any value in
you graph)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp
"bugfish69" wrote:
> I have a stacked barchart with point labels applied. For some time periods
> some of the values are zero. When this occurs, the zero lables stack up at
> the bottom of the chart and appear very unattractive. Is there a way I can
> conditionally format the point labels so that they only show if greater than
> zero'|||Thank you. Why is the obvious so hard to see sometimes?
"Marcus K" wrote:
> Try ### in the format code box (number of #'s = max digits of any value in
> you graph)
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp
> "bugfish69" wrote:
> > I have a stacked barchart with point labels applied. For some time periods
> > some of the values are zero. When this occurs, the zero lables stack up at
> > the bottom of the chart and appear very unattractive. Is there a way I can
> > conditionally format the point labels so that they only show if greater than
> > zero'sql

Point in Time: "Append to Media" Vs "Overwrite an existing media" in SQL Ser

Dear All,

I know the basic defiinition of these two options, but i am not very clear why would someone choose one over another,
currently I am using Append to Media option, and every day backup, I see my backup files growing in size.

can someone give me nice example about these two options,

Thanks,

When you append to the media the previous backups also remain in the backup file. One backup file can contain numerous backups. When you overwrite the backup file is recreated every time so it contains just one file.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||Thanks for your reply.

That means, overwrite backup media will occupy less space, then why would i choose Append to media,

any risk involved in overwriting option ?, becuase every body recommends appending, why not ovewritting.

Thanks,|||

It will definitely use less space.

I do not see the risk of overwriting your backup unless you need a full backup that was taken a couple of days earlier to be accessible. In most cases I suppose you will only be interested in the latest version of your database and not the one you had 3 months ago. For the 'special' occasions where a specific version may be required I would simply take a separate backup.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Thanks, your advice is helpful,

but if i want to be able to recover point in time, then I have to go with append to media, along with Transaction long back , RIGHT?

|||

The risk is that if you overwrite the previous backup, and then the current one fails for any reason you are left with no backup for your database. Not a good situation.

What I'd recommend instead, which is a fairly common practice, is to do each backup to a new file which incorporates the current date/time as part of the filename.

That way you always have unique filenames, you can easily prune out old backups, and it's obvious which backup is from what time.

|||

Thanks,

but even if i append to media, and it fails, i will left with no backups , Right?

also for your best suggestion, can you send me sample query or how to do in Enterprise manager.

|||Fahim,
If you are appending to a media daily and if the backup fails today (assumption) then you are atleast left with the backups of previous days since you are appending the previous backups will be present ! but if chose the overwrite option it will overwrite the existing backup file and then will backup the database so if your backup fails due to some reason you are left with no backups for your database.
You can make use of the maintenance plan in sql 2000 to configure backup job and you can specify the number of days to retain the backup file........the backup file will be created with dd/mm/hr format so that it can be deleted by chosing the option "Remove files older than"
http://www.databasejournal.com/features/mssql/article.php/3530486

Friends pls correct me if am wrong Smile

Regards
Deepak
sql

Point In Time Restore Question

This is a multi-part message in MIME format.
--=_NextPart_000_0038_01C393F7.79D233D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am restoring a production database onto a test server to a point in = time.
I restore the database from script with no issue, but when I try to = restore the first of 6 logs, I receive the following message;
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 237426000000004300001, which is = too late to apply to the database. An earlier log backup that includes = LSN 237424000000007700001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
What am I doing wrong? What does this mean and how do I get my log = restore script to work to get my database restored to a point in time?
Thanx!
--=_NextPart_000_0038_01C393F7.79D233D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
I am restoring a production database onto a test server to a point = in time.

I restore the database from script with no issue, but when I try to = restore the first of 6 logs, I receive the following message;

Server: Msg 4305, Level 16, State 1, Line 1The log in this = backup set begins at LSN 237426000000004300001, which is too late to apply to the = database. An earlier log backup that includes LSN 237424000000007700001 can be restored.Server: Msg 3013, Level 16, State 1, Line 1RESTORE LOG = is terminating abnormally.

What am I doing wrong? What does this mean and how do I get = my log restore script to work to get my database restored to a point in = time?

Thanx!
--=_NextPart_000_0038_01C393F7.79D233D0--JLS
This is telling you that you have a missing log between the database you
restored and the log that you are trying to restore. The message is telling
you that you need the log backup containing:
LSN 237424000000007700001
The log you are attempting to restore starts with:
LSN 237426000000004300001
As you can see, your log start point is greater. If you have no log backups
between the database backup and the 7700001 log backup, then that may mean
that the log was truncated during that period. When the chain of LSNs is
incomplete, you cannot restore past the break.
(In the MSDN, search for "SQL LSN" and you will get some background on
this.)
Russell Fields
"JLS" <judy.shoop@.sartomer.com> wrote in message
news:%23RvzWiBlDHA.2364@.TK2MSFTNGP11.phx.gbl...
I am restoring a production database onto a test server to a point in time.
I restore the database from script with no issue, but when I try to restore
the first of 6 logs, I receive the following message;
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 237426000000004300001, which is too
late to apply to the database. An earlier log backup that includes LSN
237424000000007700001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
What am I doing wrong? What does this mean and how do I get my log restore
script to work to get my database restored to a point in time?
Thanx!|||I do a full database backup, then an hour later I start my hourly log
backups.
I think I may need to do a log backup immediately after the database backup
if the log is somehow being truncated after the full backup, and before my
hourly log backup job starts. I need to have a full backup and an hourly
log backup.
The full backup is scheduled for 7:45, then the hourly log backups kick off
at 8:45. The first log backup I am trying to restore is the one right after
the full database backup, therefore, I guess the log is being truncated
somehow in that hour window.
Thanx for the tip on looking this up in MSDN.
--
JUDE
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:%23S2DROClDHA.2772@.TK2MSFTNGP12.phx.gbl...
> JLS
> This is telling you that you have a missing log between the database you
> restored and the log that you are trying to restore. The message is
telling
> you that you need the log backup containing:
> LSN 237424000000007700001
> The log you are attempting to restore starts with:
> LSN 237426000000004300001
> As you can see, your log start point is greater. If you have no log
backups
> between the database backup and the 7700001 log backup, then that may mean
> that the log was truncated during that period. When the chain of LSNs is
> incomplete, you cannot restore past the break.
> (In the MSDN, search for "SQL LSN" and you will get some background on
> this.)
> Russell Fields
>
> "JLS" <judy.shoop@.sartomer.com> wrote in message
> news:%23RvzWiBlDHA.2364@.TK2MSFTNGP11.phx.gbl...
> I am restoring a production database onto a test server to a point in
time.
> I restore the database from script with no issue, but when I try to
restore
> the first of 6 logs, I receive the following message;
> Server: Msg 4305, Level 16, State 1, Line 1
> The log in this backup set begins at LSN 237426000000004300001, which is
too
> late to apply to the database. An earlier log backup that includes LSN
> 237424000000007700001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
> What am I doing wrong? What does this mean and how do I get my log
restore
> script to work to get my database restored to a point in time?
> Thanx!
>|||Definitely, you don't have to do another log backup
straight after full backup.
When you backup transaction log to the same log backup
file, make sure you use WITH NOINIT option which do not
overwrite the previous backup. Or backup to the different
file name.
When you restore transaction log, you specify WITH FILE=[file no] to specify file number on the file.|||In addition, look in msdb, the backup history tables. These might assist in finding out where the
missing log backups went.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Johnny" <anonymous@.discussions.microsoft.com> wrote in message
news:2d30601c39474$bfb89c90$a601280a@.phx.gbl...
> Definitely, you don't have to do another log backup
> straight after full backup.
> When you backup transaction log to the same log backup
> file, make sure you use WITH NOINIT option which do not
> overwrite the previous backup. Or backup to the different
> file name.
> When you restore transaction log, you specify WITH FILE=> [file no] to specify file number on the file.|||Thanx Johnny, but I am doing everything that you have suggested. I backup
the log to the same backup file as the database, it is the first log file
backup after the full database backup, and when I restore I use WITH FILE
[file no]. The backup most certainly contains WITH NOINIT, until the full
database backup occurs the next night, this is when I INIT.
"Johnny" <anonymous@.discussions.microsoft.com> wrote in message
news:2d30601c39474$bfb89c90$a601280a@.phx.gbl...
> Definitely, you don't have to do another log backup
> straight after full backup.
> When you backup transaction log to the same log backup
> file, make sure you use WITH NOINIT option which do not
> overwrite the previous backup. Or backup to the different
> file name.
> When you restore transaction log, you specify WITH FILE=> [file no] to specify file number on the file.|||Ok, great! I will, because I would actually like to know what has happened.
Thanx!
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:OFpE3dIlDHA.1764@.tk2msftngp13.phx.gbl...
> In addition, look in msdb, the backup history tables. These might assist
in finding out where the
> missing log backups went.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
> "Johnny" <anonymous@.discussions.microsoft.com> wrote in message
> news:2d30601c39474$bfb89c90$a601280a@.phx.gbl...
> > Definitely, you don't have to do another log backup
> > straight after full backup.
> >
> > When you backup transaction log to the same log backup
> > file, make sure you use WITH NOINIT option which do not
> > overwrite the previous backup. Or backup to the different
> > file name.
> >
> > When you restore transaction log, you specify WITH FILE=> > [file no] to specify file number on the file.
>