sql server tuning
how does the query optimizer determine estimated row size when we execute any query? ...
how does the query optimizer determine estimated row size when we execute any query? ...
what is the difference between clustered index scan and clustered index seek? ...
I develop software that stores a lot of data in one of its database tables (SQL Server version 8, 9 or 10). Let's say, about 100,000 records are inserted into that table per day. This is about 36 million records per year. For fear that I would lose on performance, I decided to create a new table everyday (a table with current date in its...
hi guys, I have date in mm/dd/yyyy format in database.I want to display in form as dd/mm/yyyy. Can anybody help?I want to get time along with date. ...
Is there any difference between DECIMAL and NUMERIC data types in MS SQL? When should I use DECIMAL and when NUMERIC? ...
So here is a bit of a strange one... I have a stored proc that takes 40 seconds to run. I copy the contents of the stored proc to a new query window, change the 2 input parameters (which are both dates) so they are declared and set, and run the query. It is basically instant, sub 1 second execution. The only difference is the stored proc...
I need to import data from an Excel spreadsheet into SQL Server, but the data isn't in a relational/normalized format so the import wizard isn't going to cut it (as far as I know). The data is in this format: Category SubCategory Name Description Category#1 SubCategory#1 Product#1 Description#1 Category#1 SubCatego...
I am trying to get data from different sever, and the sever name might change. So I set the server name as a parameter. The idea of my sql store procedure is something like this CREATE PROCEDURE [dbo].[GetData] @ServerName AS BEGIN SELECT * FROM @ServerName.ClientDataBase.dbo.Client END Does anyone know how to achieve this...
I am using the SqlBulkCopy class to do a bulk insert into a SQLServer DB. Original size of the .mdf file associated with the DB is 1508 Mb. When I run it (on the same data of about 4 million records) with : BatchSize of 100000, the size of the .mdf grows to 1661 MB. BatchSize of 1000000, size of the .mdf grows to 1659 MB. Why this vari...
is there a sql server profiler for MSsql expess ? maybe an open source one ? or maybe just a tool that helps me see what query is passed to the database ? ...
I have a dataset in Reporting Services that looks something like this: ID | Type | Name -----+--------+-------- 1 | A | Mary 2 | A | Joe 3 | D | Steve 12 | F | Irving I want to show a textbox IF AND ONLY IF there exists a row where type = A. Basically, I want to do "Fields!Type.Contains("A...
We have some automated tests for the interaction between our data access layer (C#) and the database (MS SQL). We are using SQL Express to mount an mdf, which we revert after the testing is done. It seems that the first time the tests are run on a freshly booted machine, we see timeouts, even though SQLExpress is running. The second t...
I have a forum application using asp.net, c#, sql server and linq to sql. It suffers from multiple inserts, I think when the insert button is pressed but also maybe when the browser is refreshed or back is clicked. What's the most comprehensive way, or ways to prevent this. UPDATE: I currently use response.redirect after inserting text...
I have a web application that issues requests to 3 databases in the DAL. I'm writing some integration tests to make sure that the overall functionality round trip actually does what i expect it to do. This is completely separate from my unit tests, just fyi. The way I was intending to write these tests were something to the effect of ...
I'm trying to store Japanese characters in nvarchar fields in my SQL Server 2000 database. When I run an update statement like: update blah set address = N'スタンダードチャ' where key_ID = 1 from SQL Server Management Studio, then run a select statement I see only question marks returned to the results window. I'm seeing the same question ...
What good resources exist for understanding database tuning on the major engines and advancing your knowledge in that area? The idea of this question is to collect the shed load of resources that invariably exist, so that people can have a "one stop" knowledge shop of the good, peer approved resources. General SQL Book: SQL Perform...
Not sure what's happening with this, but here's my question. I have a Sql Server 2008 database that I need to be able to do full-text indexing/searching but when I try to setup my indices on the table, I get the following: I've tried running this stored procedure on my database and it's successful: EXEC sp_fulltext_database @action ...
What exists today to do Microsoft SQL Server Load Balancing on Windows Server and being transparent to any programatic access. Is this built in or does a solution have to be purchased? I'm trying to find out if there is a solution today that makes this very easy from the view point of the webservers or other database access to SQL Serve...
I have a set of call detail records, and from those records, I'm supposed to determine the average concurrent active calls per system, per hour (at a precision of one minute). If I query 7pm to 8pm, I should see the average concurrent calls for the hour (averaging the concurrent calls for each minute) within that hour (for each system). ...
i have the following code: if (Membership.FindUsersByName(username) == null) { Membership.CreateUser(username, password, email); } if (!Roles.RoleExists("USR")) { Roles.CreateRole("USR"); } Roles.AddUserToRole(username,"USR"); Data is being inserted in th...