Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. Stored Procedures or queries

Stored Procedures or queries

Scheduled Pinned Locked Moved LINQ
csharplinqperformance
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 3055467
    wrote on last edited by
    #1

    Hi, I am completely new to using LINQ. I have worked on writing queries directly. and also using Stored procedures.I think using procedures gives a better performance. I dont know wheteher I am right or not I want to know which one is better Thanks in advance

    I A 2 Replies Last reply
    0
    • U User 3055467

      Hi, I am completely new to using LINQ. I have worked on writing queries directly. and also using Stored procedures.I think using procedures gives a better performance. I dont know wheteher I am right or not I want to know which one is better Thanks in advance

      I Offline
      I Offline
      Ian McCaul
      wrote on last edited by
      #2

      Performance wise stored procedures will usually have the best performance because its query is actually being ran on the database server, as opposed to linq where the query is ran on the client.

      1 Reply Last reply
      0
      • U User 3055467

        Hi, I am completely new to using LINQ. I have worked on writing queries directly. and also using Stored procedures.I think using procedures gives a better performance. I dont know wheteher I am right or not I want to know which one is better Thanks in advance

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        Linq is basically a workaround of queries with .NET objects in client, which you would be doing with loops earlier. Say, you have a list of objects of your own class, instead of writing a for loop, you can write a LINQ query to do your job. Later introduction of Parallel Framework with LINQ will result in better performance. Running queries or Stored procs in database is completely a different scenario. Dont confuse LINQ with database queries my friend. And of course for database stored procs work faster than normal queries as execution plan stored with the stored proc, which is absent for normal queries. :cool:

        Abhishek Sur My Latest Articles Basics on LINQ and Lambda Expressions
        Create .NET Templates

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups