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, […]
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) […]
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 […]
This question already has an answer here: Solutions for INSERT OR UPDATE on SQL Server 21 answers
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” […]
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 […]
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 […]
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 […]
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?
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?