Tag: database

There are about 70 million inserts in a week.What indexes should i use on my columns?

I have got a table in sql server 2012 which gets almost 66 million inserts in a week. On which columns should I use indexes? create TABLE [dbo].[Details]( [ID] [bigint] IDENTITY(1,1) NOT NULL, [WorkflowContentMetricsID] [bigint] not null, [ContentType] [nvarchar](1000) NULL, [SourceID] [nvarchar](2000) NULL, [DestinationID] [nvarchar](2000) NULL, [ParentSourceID] [nvarchar](2000) NULL, [Title] [nvarchar](max) NULL, [Status] [nvarchar](max) NULL, […]

Is storing XML with a standard structure in SQL Server a bad use of the XML datatype?

We have a table in our database that stores XML in one of the columns. The XML is always in the exact same format out of a set of 3 different XML formats which is received via web service responses. We need to look up information in this table (and inside of the XML field) […]

SQL Server 2008 Update Trigger

I need to create an update trigger on a table that it also updates the table if certain inserted values are present. Is this possible? I have tried and when the inserted value is present and fires the trigger the trigger does an update and fires itself again. Eventually – deadlock. Is there a way […]

SQL Server : check for existing entry before UPDATE

This question already has an answer here: Solutions for INSERT OR UPDATE on SQL Server 21 answers

dateformating in gridview with date only

in my database sql server , there is a column name as date. in which i am inserting only date . but i retrieve the data from that table , then it show time with date . but i want only date . see here here is my code for gridview <asp:GridView ID=”GridIssue” runat=”server” CssClass=”grid” […]

What are typical lengths of chat message and comment in database?

I need to create a column in SQL Server database. Entries for that column will contain messages from chat. Previously such messages has been stored as comments. My main quetion is: What is typical text length for chat message and comment? By the way: What would happen if I used varchar(max)? How would it impact […]

Conditional aggregate database queries and their performance implications

I think this question is best asked with an example: if you want two counts from a table – say one with all the rows with a bit flag set to false and another with all of the ones set to true – is there a best practice for this kind of query and what […]

Some doubts about this simple INNER JOIN query?

I have the following doubt about this simple INNER JOIN query. I have these two tables that have to be joined togheter: The first table is named VulnerabilityFix and contains the following columns: Id: int identity FixName: varchar Vendor: varchar Title: varchar Version: varchar The second table is named VulnerabilityAlertDocument_VulnerabilityFix (this bind the previous table […]

Which version of SQL Server supports.Net framework 4.5?

I am new to .NET technology and I am using Visual Studio 2012 and .net framework 4.5. I tried SQL Server 2008 but I’m unable to connect to it with server name . and .\SQLEXPRESS. Which version of SQL Server should I install for database access and please provide the link for same?

SQL Server 2008 : What is the best way for inserting big chunk of data?

We need to extract 54M rows from one database to another. Columns of two tables are similar but not exactly same so there is some conversion work to do. I’ve started a cursor, but is there any better and also performance friendly way for inserting big chunk of data?

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.