Note that there are some explanatory texts on larger screens.

plurals
  1. PODropping Azure Schema or Deleting Rows takes a very long time
    primarykey
    data
    text
    <p>Vague title I know.</p> <p>I have, at the moment, 16,000 rows in my database. This was created just while in development, I want to now delete all these rows so I can start again (so I don't have duplicate data).</p> <p>The database is on SQL Azure.</p> <p>If I run a select query</p> <pre><code>SELECT [Guid] ,[IssueNumber] ,[Severity] ,[PainIndex] ,[Status] ,[Month] ,[Year] ,[DateCreated] ,[Region] ,[IncidentStart] ,[IncidentEnd] ,[SRCount] ,[AggravatingFactors] ,[AggravatingFactorDescription] FROM [dbo].[WeeklyGSFEntity] GO </code></pre> <p>This returns all the rows, and SSMS says this takes 49 seconds.</p> <p>If I attempt to drop the table, this goes on for 5 minutes plus.</p> <pre><code>DROP TABLE [dbo].[WeeklyGSFEntity] GO /****** Object: Table [dbo].[WeeklyGSFEntity] Script Date: 10/01/2013 09:46:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[WeeklyGSFEntity]( [Guid] [uniqueidentifier] NOT NULL, [IssueNumber] [int] NULL, [Severity] [int] NULL, [PainIndex] [nchar](1) NULL, [Status] [nvarchar](255) NULL, [Month] [int] NULL, [Year] [int] NULL, [DateCreated] [datetime] NULL, [Region] [nvarchar](255) NULL, [IncidentStart] [datetime] NULL, [IncidentEnd] [datetime] NULL, [SRCount] [int] NULL, [AggravatingFactors] [nvarchar](255) NULL, [AggravatingFactorDescription] [nvarchar](max) NULL, PRIMARY KEY CLUSTERED ( [Guid] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ) GO </code></pre> <p>If I attempt to delete each row, this also takes 5 minutes plus.</p> <pre><code>DELETE FROM [dbo].[WeeklyGSFEntity] GO </code></pre> <p>Am I doing something wrong or is it just that this is <em>big</em> data and I'm being impatient?</p> <p><strong>UPDATE:</strong></p> <p>Dropping the entire database took some 25 seconds.</p> <p>Importing 22,000 rows (roughly the same 16,000 plus more) into <code>localdb\v11.0</code> took 6 seconds. I know this is local but surely the local dev server is slower than Azure? Surely...</p> <p><strong>UPDATE the second:</strong></p> <p>Recreating the database and recreating the schema (with (Fluent) NHibernate), and then inserting some 20,000 rows took 2 minutes 6 seconds. All Unit Tests pass. Is there anything I can do to look back?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload