Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 523417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:27:36+00:00 2026-05-13T08:27:36+00:00

I have a table with with 7,526,511 records with the following definition: /****** Object:

  • 0

I have a table with with 7,526,511 records with the following definition:

/****** Object:  Table [dbo].[LogSearches]    Script Date: 12/07/2009 09:23:14 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[LogSearches](
    [ID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
    [Acct_ID] [int] NULL,
    [RecordCount] [int] NOT NULL,
    [PageNumber] [int] NOT NULL,
    [Site_ID] [int] NOT NULL,
    [SearchAPI] [bit] NOT NULL,
    [FormSearch] [bit] NOT NULL,
    [IPAddress] [varchar](15) NOT NULL,
    [Domain] [nvarchar](150) NOT NULL,
    [ScriptName] [nvarchar](500) NOT NULL,
    [QueryString] [varchar](max) NULL,
    [Referer] [nvarchar](1024) NOT NULL,
    [SearchString] [nvarchar](max) NOT NULL,
    [UserAgent] [nvarchar](2048) NULL,
    [Processed] [datetime] NOT NULL,
    [Created] [datetime] NOT NULL,
    [IntegerIP] [int] NULL,
 CONSTRAINT [PK_LogSearches] PRIMARY KEY CLUSTERED 
(
    [ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[LogSearches] ADD  CONSTRAINT [DF_LogSearches_Processed]  DEFAULT (getdate()) FOR [Processed]
GO

ALTER TABLE [dbo].[LogSearches] ADD  CONSTRAINT [DF_LogSearches_Created]  DEFAULT (getdate()) FOR [Created]
GO

The execution plan looks like this:

StmtText                                                                                 StmtId      NodeId      Parent      PhysicalOp                     LogicalOp                      Argument                                                 DefinedValues                                                                                                                                                                                                                                                    EstimateRows  EstimateIO    EstimateCPU   AvgRowSize  TotalSubtreeCost OutputList                                                                                                                                                                                                                                                       Warnings Type                                                             Parallel EstimateExecutions
---------------------------------------------------------------------------------------- ----------- ----------- ----------- ------------------------------ ------------------------------ -------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------- ------------- ------------- ----------- ---------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- ---------------------------------------------------------------- -------- ------------------
SELECT TOP 1 * FROM LogSearches                                                          1           1           0           NULL                           NULL                           1                                                        NULL                                                                                                                                                                                                                                                             1             NULL          NULL          NULL        0.0032832        NULL                                                                                                                                                                                                                                                             NULL     SELECT                                                           0        NULL
  |--Top(TOP EXPRESSION:((1)))                                                           1           2           1           Top                            Top                            TOP EXPRESSION:((1))                                     NULL                                                                                                                                                                                                                                                             1             0             1E-07         11848       0.0032832        [LOALogs].[dbo].[LogSearches].[ID], [LOALogs].[dbo].[LogSearches].[Acct_ID], [LOALogs].[dbo].[LogSearches].[RecordCount], [LOALogs].[dbo].[LogSearches].[PageNumber], [LOALogs].[dbo].[LogSearches].[Site_ID], [LOALogs].[dbo].[LogSearches].[SearchAPI], [LOALo NULL     PLAN_ROW                                                         0        1
       |--Clustered Index Scan(OBJECT:([LOALogs].[dbo].[LogSearches].[PK_LogSearches]))  1           3           2           Clustered Index Scan           Clustered Index Scan           OBJECT:([LOALogs].[dbo].[LogSearches].[PK_LogSearches])  [LOALogs].[dbo].[LogSearches].[ID], [LOALogs].[dbo].[LogSearches].[Acct_ID], [LOALogs].[dbo].[LogSearches].[RecordCount], [LOALogs].[dbo].[LogSearches].[PageNumber], [LOALogs].[dbo].[LogSearches].[Site_ID], [LOALogs].[dbo].[LogSearches].[SearchAPI], [LOALo 1             2956.71       8.279319      11848       0.0032831        [LOALogs].[dbo].[LogSearches].[ID], [LOALogs].[dbo].[LogSearches].[Acct_ID], [LOALogs].[dbo].[LogSearches].[RecordCount], [LOALogs].[dbo].[LogSearches].[PageNumber], [LOALogs].[dbo].[LogSearches].[Site_ID], [LOALogs].[dbo].[LogSearches].[SearchAPI], [LOALo NULL     PLAN_ROW                                                         0        1

(3 row(s) affected)

When I run the query it doesn’t finish in any sort of reasonable time frame. I’ve let the query run for over 5 minutes, and it still didn’t return the single row I asked for. This type of slow SELECT performance is having other effects on the database, such as making it difficult to get rid of rows we no longer need.

Do you have an idea where my bottleneck might be? The 98 gig database and its logs are running on SQL Server 2008 on a 4-disk RAID 10 with over 100 gigs of free space on the drives.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:27:37+00:00Added an answer on May 13, 2026 at 8:27 am

    Have you checked to see if you are having a blocking issue?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table like below ID User Date Location 1 Tom 6-Mar-2012 US 2
I have table that has date field. When I run a query, I see
I have table, which I am inserting records to another table. What is the
I have table ,and i need access them from shell script and do the
I have table with data about tasks like Id, Name, Date, WorkerId, VehicleId (and
I have table named as contacts which has nearly 1.2 million records we use
I have table with millions of records (rows). And in this table there is
I have table with 300 000 records (MyISAM). I get record from this table
I have table Owner in my database where one of the field (System) saved
I have table of over 4 million rows and accidentally in one column there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.