Search Results

Search found 4908 results on 197 pages for 'ssas 2005'.

Page 106/197 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • Cardinality Estimation Bug with Lookups in SQL Server 2008 onward

    - by Paul White
    Cost-based optimization stands or falls on the quality of cardinality estimates (expected row counts).  If the optimizer has incorrect information to start with, it is quite unlikely to produce good quality execution plans except by chance.  There are many ways we can provide good starting information to the optimizer, and even more ways for cardinality estimation to go wrong.  Good database people know this, and work hard to write optimizer-friendly queries with a schema and metadata (e.g. statistics) that reduce the chances of poor cardinality estimation producing a sub-optimal plan.  Today, I am going to look at a case where poor cardinality estimation is Microsoft’s fault, and not yours. SQL Server 2005 SELECT th.ProductID, th.TransactionID, th.TransactionDate FROM Production.TransactionHistory AS th WHERE th.ProductID = 1 AND th.TransactionDate BETWEEN '20030901' AND '20031231'; The query plan on SQL Server 2005 is as follows (if you are using a more recent version of AdventureWorks, you will need to change the year on the date range from 2003 to 2007): There is an Index Seek on ProductID = 1, followed by a Key Lookup to find the Transaction Date for each row, and finally a Filter to restrict the results to only those rows where Transaction Date falls in the range specified.  The cardinality estimate of 45 rows at the Index Seek is exactly correct.  The table is not very large, there are up-to-date statistics associated with the index, so this is as expected. The estimate for the Key Lookup is also exactly right.  Each lookup into the Clustered Index to find the Transaction Date is guaranteed to return exactly one row.  The plan shows that the Key Lookup is expected to be executed 45 times.  The estimate for the Inner Join output is also correct – 45 rows from the seek joining to one row each time, gives 45 rows as output. The Filter estimate is also very good: the optimizer estimates 16.9951 rows will match the specified range of transaction dates.  Eleven rows are produced by this query, but that small difference is quite normal and certainly nothing to worry about here.  All good so far. SQL Server 2008 onward The same query executed against an identical copy of AdventureWorks on SQL Server 2008 produces a different execution plan: The optimizer has pushed the Filter conditions seen in the 2005 plan down to the Key Lookup.  This is a good optimization – it makes sense to filter rows out as early as possible.  Unfortunately, it has made a bit of a mess of the cardinality estimates. The post-Filter estimate of 16.9951 rows seen in the 2005 plan has moved with the predicate on Transaction Date.  Instead of estimating one row, the plan now suggests that 16.9951 rows will be produced by each clustered index lookup – clearly not right!  This misinformation also confuses SQL Sentry Plan Explorer: Plan Explorer shows 765 rows expected from the Key Lookup (it multiplies a rounded estimate of 17 rows by 45 expected executions to give 765 rows total). Workarounds One workaround is to provide a covering non-clustered index (avoiding the lookup avoids the problem of course): CREATE INDEX nc1 ON Production.TransactionHistory (ProductID) INCLUDE (TransactionDate); With the Transaction Date filter applied as a residual predicate in the same operator as the seek, the estimate is again as expected: We could also force the use of the ultimate covering index (the clustered one): SELECT th.ProductID, th.TransactionID, th.TransactionDate FROM Production.TransactionHistory AS th WITH (INDEX(1)) WHERE th.ProductID = 1 AND th.TransactionDate BETWEEN '20030901' AND '20031231'; Summary Providing a covering non-clustered index for all possible queries is not always practical, and scanning the clustered index will rarely be optimal.  Nevertheless, these are the best workarounds we have today. In the meantime, watch out for poor cardinality estimates when a predicate is applied as part of a lookup. The worst thing is that the estimate after the lookup join in the 2008+ plans is wrong.  It’s not hopelessly wrong in this particular case (45 versus 16.9951 is not the end of the world) but it easily can be much worse, and there’s not much you can do about it.  Any decisions made by the optimizer after such a lookup could be based on very wrong information – which can only be bad news. If you think this situation should be improved, please vote for this Connect item. © 2012 Paul White – All Rights Reserved twitter: @SQL_Kiwi email: [email protected]

    Read the article

  • Going back to ASP.Net Webforms from ASP.Net MVC. Recommend patterns/architectures?

    - by jlnorsworthy
    To many of you this will sound like a ridiculous question, but I am asking because I have little to no experience with ASP.Net Webforms - I went straight to ASP.Net MVC. I am now working on a project where we are limited to .Net 2.0 and Visual Studio 2005. I liked the clean separation of concerns when working with ASP.Net MVC, and am looking for something to make webforms less unbearable. Are there any recommended patterns or practices for people who prefer asp.net MVC, but are stuck on .net 2.0 and visual studio 2005?

    Read the article

  • ERROR_PROCEDURE Does Not Return a Schema Name

    "A recent blog entry I read reminded me again that I wanted to rant about an issue in SQL Server for quite some time now. SQL Server 2005 introduced the separation between user and schema. Though schemata already existed before SQL Server 2005, they really became usable with this version, imho. At the same time TRY...CATCH was a new way for structured error handling introduced. And so it finally became possible…" NEW! SQL Monitor 2.0Monitor SQL Server Central's servers withRed Gate's new SQL Monitor.No installation required. Find out more.

    Read the article

  • Microsoft confirme la sortie mondiale de SQL Server 2008 R2 début mai, et annonce sa mise en product

    Mise à jour du 29.03.2010 par Katleen Microsoft dévoile les prochaines dates de sortie de SQL Server, version 2005 (SP4) et 2008 (SP2) L'équipe travaillant sur SQL Serveur vient de publier un billet assez succinct sur son blog, à propos des prochains services packs à sortir. Ces road maps indiquent uniquement les dates de sortie, et pas encore les contenus. SQL Server 2005 (SP4) sera disponible au cours du dernier trimestre 2010, il s'agira du dernier service pack pour cette version. SQL Server 2008 (SP2) devrait sortir lors du troisième trimestre 2010 Plus d'informations à venir sur ces deux sorties bientôt, notamment à propos de leurs contenus. A...

    Read the article

  • Links to SQL Articles

    - by Baskar B.V
    This post would be updated with links to nice articles which i would come across in SQL Server (database). Default Trace in SQL 2005: http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/

    Read the article

  • SCOM, Server 2008 and SQL Server 2008

    - by Jacques
    Hi there, I'm trying to setup SCOM(System Center Operations Manager 2007 (SCOM) – Platform Monitoring) on my Server 2008 machine using SQL Server 2008 running on the same machine. When I check my prerequisites I get problem on SQL and Active Directory components. (I'm running SQL server 2008 and Server 2008 with active directory not installed) Errors: 1.Microsoft SQL Server 2005 Service Pack 1 required. Details: SQL Server 2005 SP1 is the next version of SQL Server. SQL Server 2005 Enterprise Edition, is a complete data and analysis platform for large mission-critical business applications. The link provided in the resolution column is a trial version of the product and is not supported by the Microsoft SQL Server team In order to install active directory needs to be present. Details:Setup failed to verify the presence of Active Directory for this server. I've got a couple of questions I need answering, hope someone can help. Do I need to install Active Directory for SCOM to work? Can I run SCOM with an SQL 2008 Database? How do I get pass these problems?

    Read the article

  • How to implement Object Databases in Asp.net MVC

    - by amexn
    I started my project in Asp.net MVC(c#) & SQL Server 2005.I want to implement Object Databases in my project. While searched in google i found "MongoDb" & db4o I didn't have enough knowledge in Object Databases & which one best suited for SQL Server 2005. Please suggest a good example/reference regarding Object Databases implementation in Asp.net MVC application

    Read the article

  • How to implement Object Databases in Asp.net MVC(c#)

    - by amexn
    I started my project in Asp.net MVC(c#) & MSSQL 2005.I want to implement Object Databases in my project. While searched in google i found "MongoDb" I didn't have enough knowledge in Object Databases & which one best suited for MSSQL 2005. Please suggest a good example/reference regarding Object Databases implementation in Asp.net MVC application

    Read the article

  • stored procedure exception handling in asp.net

    - by anay
    Do i need to use try catch in my stored procedure to know where exactly in my procedure error has occured or can i achieve the same if i useSqlConnection.BeginTransaction in my ASP.NET form or simple try catch may be...??? I tried implementing try catch in my stored procedure..i m using sql server 2005 but it does not know TRY and CATCH keywords or ERROR_MESSAGE() function...i also installed sql server 2005 service manager but still it does not work.. if an error is thrown using RAISERROR method will the exception will be shown in my ASP.NET form??

    Read the article

  • Missing Microsoft.SQLServer dlls

    - by coffeeaddict
    Ok, I installed the Microsoft SQL Server 2005 Backward Compatibility Components here file:///C:/Users/davids/AppData/Local/Temp/instructions_enu.htm but I guess these dlls are not in this. Anyone know where the heck I can get these? Yes, I'm running SQL 2008 so they are missing because they're for 2005. Microsoft.SqlServer.ConnectionInfo.dll Microsoft.SqlServer.Smo ...

    Read the article

  • SQL Server backward compatibility in Entity Framework?

    - by shake
    Is there any backward compatibility in the entity framework between SQL Server 2008 and 2005? It seems the framework forces you to use the same provider for all the .edmx files in a solution. If you use the 2008 provider, data types like DateTime2 and functions like SysDateTime that are emitted by the framework to the underlying SQL query make it useless to use them against a SQL 2005 Server. Any way around this?

    Read the article

  • COGNOS 8 Bi value prompt

    - by Rahul Kadam
    Currently I have a value prompt added to my report (with UI selected as List-Box) and the date item used is name 'YEAR'. Now when I run the report the values in the value prompt are seen as below: YEAR 2004 2005 2006 What I want to do is get rid of the year tag that is present in the output of the value prompt box, more clearly the output in the value prompt box should be as below: 2004 2005 2006 Can someone let me know how that can be achieved?

    Read the article

  • session value lost in page load

    - by user314399
    i have converted a web application project from 2003 to 2005.everything works fine in 2003,but the converted web application project in 2005 has some problem, problem is in session values,initially the session value works fine(for the first time),but if the page is loaded for the second time the session value becomes empty. please get me some answers or links to refer.

    Read the article

  • Does VS2010 does not install SQL Server during installation

    - by Greg
    Hi, Just confirming -does VS2010 does not install SQL Server during installation? I'm assuming no. This being the case I therefore need to download a copy of SQL Express 2005 or something to develop against on my windows XP home PC? Is this correct? Or would the Dev edition of SQL Server 2005 run/install on Windows XP Home? thanks

    Read the article

  • ORM vs SQL XML, very simple middle-tier

    - by synergetic
    I know it is rather heated question. But anyway I'd like to hear opinions of those in Stackoverflow. Given that XML support is quite good in SQL Server 2005/2008, and there's no concern about database independency, why one need Linq-to-SQL, Entity Framework, NHibernate and the likes, which are quite complex and awkward in advanced use-cases, if by using POCOs, XmlSerializer, and stored procedures which process XML, one can achieve a lot less complex middle-tier? For reference, see the link: http://weblogs.asp.net/jezell/archive/2007/04/13/who-needs-orm-i-ve-got-sql-2005.aspx

    Read the article

  • VWD 2008 Express : where can i set absolute positioning as a default?

    - by Justin
    So when I used Visual Web Developer 2005 Express edition, in the ribbon there was a menu option for "Layout", which you could go through and select positioning and set absolute to default. I am using Visual Web Developer 2008 Express now, and I see that you can select format from the menu bar, and set position absolute, for each individual control that you add to the design surface, but is there a place I can just set absolute as the default, like in 2005? Thanks, Justin

    Read the article

  • How to set the correct Visual Studio version as JIT debugger?

    - by Lothar
    I have VS2003, VS2005 and VS2008 installed on my machine. The C++ application is compiled with VS2005 but when it crashs and i select debug the Just-In-Time Debugging dialog comes up and only offers me "New instance of Visual Studio .NET 2003". Debugging a 2005 compiled program with 2003 is not possible. If i attach the process to VS2005 then it works well, but this is very inconvenient. How do i set .NET 2005 vor JIT debugging?

    Read the article

  • Using DateTime in PHP, generating bad unix epoch time from $foo->format('U')

    - by Jazzepi
    I can't seem to get the correct Unix epoch time out of this PHP DateTime object. $startingDateTime = "2005/08/15 1:52:01 am"; $foo = new DateTime($startingDateTime, new DateTimeZone("America/New_York")); echo $foo-format('U'); which gives 1124085121 Which is Mon, 15 Aug 2005 00:52:01 GMT -500 (according to http://www.epochconverter.com/) but that's incorrect by an hour. It SHOULD be 1124088721 and spit back at me as Mon, 15 Aug 2005 01:52:01 GMT -500 Any help would be appreciated.

    Read the article

  • Parsing XML data with Namespaces in PHP

    - by osbmedia
    I'm trying to work with this XML feed that uses namespaces and i'm not able to get past the colon in the tags. Here's how the XML feed looks like: <r25:events pubdate="2010-05-19T13:58:08-04:00"> <r25:event xl:href="event.xml?event_id=328" id="BRJDMzI4" crc="00000022" status="est"> <r25:event_id>328</r25:event_id> <r25:event_name>Testing 09/2005-08/2006</r25:event_name> <r25:alien_uid/> <r25:event_priority>0</r25:event_priority> <r25:event_type_id xl:href="evtype.xml?type_id=105">105</r25:event_type_id> <r25:event_type_name>CABINET</r25:event_type_name> <r25:node_type>C</r25:node_type> <r25:node_type_name>cabinet</r25:node_type_name> <r25:state>1</r25:state> <r25:state_name>Tentative</r25:state_name> <r25:event_locator>2005-AAAAMQ</r25:event_locator> <r25:event_title/> <r25:favorite>F</r25:favorite> <r25:organization_id/> <r25:organization_name/> <r25:parent_id/> <r25:cabinet_id xl:href="event.xml?event_id=328">328</r25:cabinet_id> <r25:cabinet_name>cabinet 09/2005-08/2006</r25:cabinet_name> <r25:start_date>2005-09-01</r25:start_date> <r25:end_date>2006-08-31</r25:end_date> <r25:registration_url/> <r25:last_mod_dt>2008-02-27T14:22:43-05:00</r25:last_mod_dt> <r25:last_mod_user>abc00296004</r25:last_mod_user> </r25:event> </r25:events> And here is what I'm using for code - I'll trying to throw these into a bunch of arrays where I can format the output however I want: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://somedomain.com/blah.xml"); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); $xml = new SimpleXmlElement($output); foreach ($xml->events->event as $entry){ $dc = $entry->children('http://www.collegenet.com/r25'); echo $entry->event_name . "<br />"; echo $entry->event_id . "<br /><br />"; }

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >