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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:47:45+00:00 2026-05-23T22:47:45+00:00

I’ve got a basic SQL query that looks like: SELECT TOP 1 [geom].STBuffer(500) FROM

  • 0

I’ve got a basic SQL query that looks like:

SELECT TOP 1
[geom].STBuffer(500)
FROM [db].[dbo].[boundaries]

Which essential takes a map boundary from the database and buffers it by 500m. The problem I’m having is that it’s incredibly slow and then the server runs out of memory! I’m sure something must be wrong as a simple operation like this in a GIS program takes seconds to run, whereas this runs for around a minute before giving up.

The boundary is fairly complicated, but it shouldn’t be so complicated as to cause the server to run out of memory, I’m sure of that.

If I reduce the buffer distance to say 100m, it runs and completes within around 14 seconds, which is still too slow to be useful in realtime.

Any idea as to why it might be so slow, and any tips as to how I can speed it up?

Thanks,

  • 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-23T22:47:46+00:00Added an answer on May 23, 2026 at 10:47 pm

    This is a known limitation with STBuffer in Sql Server 2008 – it is prone to being slow and potentially running out of memory when the distance parameter is larger than the diameter of the object and the object has more than 1000 points. There is a connect item for this issue and it is fixed in Sql Server Denali.

    As a workaround, you can try running Reduce on the object before invoking buffer to lower its complexity, and using BufferWithTolerance method to pass in a higher tolerance which will result in a less complex result.

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

Sidebar

Related Questions

Got some basic XML as a XML datatype within SQL 2005. One record/row looks
I've got a project that was written in BASIC. I'm not sure of the
I've got a query that I've just found in the database that is failing
I've got a 2.0 server control that uses a dynamic query roughly in the
I've got a basic PIVOT-question here that probably won't cause you gurus any trouble:
I've got a basic php script that runs perfect in a browser. I want
I've got a pretty basic question about how to start using Castle Windsor. I've
I think I've got it down to the most basic case: int main(int argc,
I got this doubt while writing some code. Is 'bool' a basic datatype defined
I've got two sizing issue regarding a Window I've got. The basic layout is

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.