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 842875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:02:08+00:00 2026-05-15T06:02:08+00:00

I am using a simple table with 6 columns, 3 of which are of

  • 0

I am using a simple table with 6 columns, 3 of which are of XML type, not schema-constrained.
When the table reaches a size around 120,000 or 150,000 rows, I see a dramatic performance cost in doing any query in the table. For comparison, I have another table, which grows in size at about the same rate, but only contain scalar types (int, datetime, a few float columns). That table performs perfectly fine even after 200,000 rows.
And by the way, I am not using XQuery on the xml columns, i am only using regular SQL query statements.

Some specifics: both tables contain a DateTime field called SampleTime.
a statement like (it’s in a stored procedure but I show you the actual statement)

SELECT MAX(sampleTime) SampleTime
FROM dbo.MyRecords
WHERE PlacementID=@somenumber

takes 0 seconds on the table without xml columns, and anything from 13 to 20 seconds on the table with XML columns. That depends on which drive I set my database on. At the moment it sits on a different spindle (not C:) and it takes 13 seconds.

Has anyone seen this behavior before, or have any hint at what I am doing wrong?
I tried this with SQL 2008 EXPRESS and the full-blown SQL Server 2008, that made no difference.
Oh, one last detail: I am doing this from a C# application, .NET 3.5, using SqlConnection, SqlReader, etc..

I’d appreciate some insight into that, thanks!

Sam

  • 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-15T06:02:08+00:00Added an answer on May 15, 2026 at 6:02 am

    Do you have an index on PlacementID and sampleTime in that order?

    Both the size of the table and columns types are irrelevant if an index can satisfy the query (“covering”)

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

Sidebar

Related Questions

I have a simple HTML table which is bound using knockoutJS. However, I've added
I have a table with a few relational columns and one XML column which
Using MySQL, I have a simple table that logs the IP Address that users
I am using simple pseudo-selector css functionlity. When I hover over my table-cells, they
I'm building a simple search table (eventually using jquery Datatables) for our knowledgebase. I'm
I'm currently developing a simple iPhone application using a UITabBar and table views for
I'm trying to reindex a table in a simple database that I created using
I have simple table with two columns: id INTEGER as a key, and data
I'm trying to transform some XML output to a rating table (hydrology related) which
So let's say I have a simple table containing 2 columns Shipment_ID (uniqueidentifier) and

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.