Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
peddi_praveen
Starting Member
48 Posts |
Posted - 2003-10-16 : 16:58:50
|
| hi guys, while i run a Stored Proc and profiling this , i had encountered these kinda statements.SELECT statman([ListingAddressPostalCode],[ListingAddressStreetNumber],[ListingAddressStreetName],[ListingAddressUnitNumber],[DataSourceID],[AMListingID],@PSTATMAN) FROM (SELECT TOP 100 PERCENT [ListingAddressPostalCode],[ListingAddressStreetNumber],[ListingAddressStreetName],[ListingAddressUnitNumber],[DataSourceID],[AMListingID] FROM [dbo].[LISTING] WITH(READUNCOMMITTED,SAMPLE 1.000000e+002 PERCENT) ORDER BY [ListingAddressPostalCode],[ListingAddressStreetNumber],[ListingAddressStreetName],[ListingAddressUnitNumber],[DataSourceID],[AMListingID]) AS _MS_UPDSTATS_TBL OPTION (BYPASS OPTIMIZER_QUEUE, MAXDOP 1)any help would be appreciated. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-10-16 : 17:02:02
|
| Did you check your code to see where it was doing this? It looks like you have a UDF named statman.Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-10-16 : 17:04:33
|
| Tara..your name was not even on the board when I clicked in....Makes greased lightning look like molases...Preedy: Is the statement failing?Profiler will show you all kinds of things that sql does under the covers..Brett8-) |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-10-16 : 18:04:55
|
| It looks like it is generating statistics to create the query plan.Yep - if you run a create statistics you get this sort of entry.Which brings up a little cosmetic bug.If you rundrop statistics mytblthe error message isFor DROP STATISTICS, you must give both the table and the column name in the form 'tablename.column'.whereas in fact you need the tablename and statisticsname==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
VyasKN
SQL Server MVP & SQLTeam MVY
313 Posts |
Posted - 2003-10-16 : 19:24:21
|
| That is something executed by SQL Server in relation to creating/updating statistics. Not coming from your application :-)--HTH,Vyashttp://vyaskn.tripod.com |
 |
|
|
peddi_praveen
Starting Member
48 Posts |
Posted - 2003-10-17 : 04:53:53
|
| hi vyas, Tx. my SP is bulk -insert centric,we are reading text files into #tables, do certain validations , and thenn Push into the Actual db.i had noticed few things from profiler:1. SELECT Statman are been expensive2. Few locations, SP is been recompiled after SELECT Statman,how do i eliminate the SELEct staman to improve Performance.Also, I noticed unusual grwoth in tempdb size and actual db log sizes. indeed, each execution, both together increased by 1GB.your suggestions plz... |
 |
|
|
|
|
|
|
|