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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:21:14+00:00 2026-05-27T12:21:14+00:00

I’m writing a database front-end that so far relies on a data access layer

  • 0

I’m writing a database front-end that so far relies on a data access layer between the client UI and the database. As an SQL noob (and since this isn’t a high-security application) I’m happy with the DAL as an alternative to writing all the database logic in stored procedures.

My concern at the moment is speed. I understand that SQL Server will compile stored procedures and execute them a lot faster than random queries, but I can’t find any info on how much of an impact this actually has on performance.

I know that if I were designing SQL Server, I would at least consider transparently caching common queries, as well as dynamically storing and compiling procedures as needed to accomodate common queries. I imagine that this would largely eliminate the need for stored procedures in many scenarios (except for encapsulating the database, obviously.)

But at the moment my database is pretty small so I can’t really tell how well it’s performing. Am I on the wrong path here? Will I end up painfully migrating all the logic to stored procedures once the database grows to millions of records and I discover the error of my ways?

On a related note, how does the performance of SELECT scale with table size? I can’t seem to find any resources on this, but it seems crucial to deciding how to lay out my database. Do I shove all my entries into one table, say, and rely on WHERE to isolate them in logical groups, or do I group entries into separate tables because SELECTing 100 out of a million rows is horribly slow?

  • 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-27T12:21:15+00:00Added an answer on May 27, 2026 at 12:21 pm

    If you use properly parametrized queries (with parameters like @CustomerID instead of concatenating together your SQL statement), there shouldn’t be much difference between stored procedures and plain SQL statements. Both the execution plans for plain queries as well as for stored procedures are cached by SQL Server, and if they’re re-used frequently, they won’t be tossed out of the cached too quickly. So strictly from a performance perspective, stored procedures don’t really give you much of a benefit.

    Stored procedures can be beneficial since they can provide another layer of security – if all your data access goes via the stored procedures, the “regular” users don’t typically need even read permissions on the base tables.

    As for table size: if you have proper indexing in place, a simple Index Seek operation will take about 3-6 page reads in SQL Server to get to the leaf level – and that’s for up to several million data pages. The point is : proper indexing and that’s not always easy and obvious to get right.

    One of the most important aspects in SQL Server is getting the clustering index right, since that defines the phsyical order of your data, and the clustering key is the most replicated / most redundant data piece in your server – so you want to make that as efficient as possible.

    Check out Kimberly Tripp’s outstanding blog post More Considerations For The Clustering Key and also study her other blog posts she links to to get a good understanding of what makes a good clustering key – this is absolutely crucial to get right!

    Kimberly – the Queen of Indexing on SQL Server – also has a ton of great blog post on how to choose good nonclustered indices, and when less is more (don’t over-index your database either – that could be even worse than no indexes at all)

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I need a function that will clean a strings' special characters. I do NOT
I want to construct a data frame in an Rcpp function, but when I
I am writing an app with both english and french support. The app requests
I have a reasonable size flat file database of text documents mostly saved in

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.