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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. ORM with streaming

ORM with streaming

Scheduled Pinned Locked Moved Database
databasearchitecturequestion
5 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.
  • P Offline
    P Offline
    pebrian27
    wrote on last edited by
    #1

    Hi! Is there an ORM that provides streaming support? What I mean by streaming is that the users can see the rows/objects being loaded one-by-one/partially (Think of SQL Management Studio when the query result is thousands of record). I can't implement paging since our data changes very fast. Background: - DB contains >250 million of data (but I will limit the result set to 10K max) - Query can take minutes even hours - Can't change DB architecture Thanks

    M 1 Reply Last reply
    0
    • P pebrian27

      Hi! Is there an ORM that provides streaming support? What I mean by streaming is that the users can see the rows/objects being loaded one-by-one/partially (Think of SQL Management Studio when the query result is thousands of record). I can't implement paging since our data changes very fast. Background: - DB contains >250 million of data (but I will limit the result set to 10K max) - Query can take minutes even hours - Can't change DB architecture Thanks

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      pebrian27 wrote:

      but I will limit the result set to 10K max

      Why, how useful is 10k records in a UI, why not limit to 100 or 50 or something the user can work with.

      pebrian27 wrote:

      Query can take minutes even hours

      This does not make sense when servicing a UI. A select statement that takes hours, ridiculous, your design is screwed. If the query takes hours the user has got bored and gone home. Change you design to data dump, output the data via a job/SSIS package and make it available in a shared folder. We extended SSRS to do just this sort of work, anything more than 1k rows is a lousy design for a UI and a report. [edit] Checked your profile, web developer, so use an FTP/download scenario[/edit]

      Never underestimate the power of human stupidity RAH

      P 1 Reply Last reply
      0
      • M Mycroft Holmes

        pebrian27 wrote:

        but I will limit the result set to 10K max

        Why, how useful is 10k records in a UI, why not limit to 100 or 50 or something the user can work with.

        pebrian27 wrote:

        Query can take minutes even hours

        This does not make sense when servicing a UI. A select statement that takes hours, ridiculous, your design is screwed. If the query takes hours the user has got bored and gone home. Change you design to data dump, output the data via a job/SSIS package and make it available in a shared folder. We extended SSRS to do just this sort of work, anything more than 1k rows is a lousy design for a UI and a report. [edit] Checked your profile, web developer, so use an FTP/download scenario[/edit]

        Never underestimate the power of human stupidity RAH

        P Offline
        P Offline
        pebrian27
        wrote on last edited by
        #3

        Our users are also technical people and they need ~10k records. Also, the users get to create the queries (ad-hoc queries). My current ORM is Nhibernate so they use HQL which is very similar to SQL.

        Mycroft Holmes wrote:

        pebrian27 wrote: Query can take minutes even hours This does not make sense when servicing a UI. A select statement that takes hours, ridiculous, your design is screwed.

        Oops... Queries will only take hours if I don't do the 10k limit. Currently, querying 500 records takes 2 mins. Thats why I want streaming support so that if they get bored, they can press cancel but still get partial result. Our systems will be upgraded after 8 months.

        P 1 Reply Last reply
        0
        • P pebrian27

          Our users are also technical people and they need ~10k records. Also, the users get to create the queries (ad-hoc queries). My current ORM is Nhibernate so they use HQL which is very similar to SQL.

          Mycroft Holmes wrote:

          pebrian27 wrote: Query can take minutes even hours This does not make sense when servicing a UI. A select statement that takes hours, ridiculous, your design is screwed.

          Oops... Queries will only take hours if I don't do the 10k limit. Currently, querying 500 records takes 2 mins. Thats why I want streaming support so that if they get bored, they can press cancel but still get partial result. Our systems will be upgraded after 8 months.

          P Offline
          P Offline
          pebrian27
          wrote on last edited by
          #4

          Nhibernate isn't the cause of the slow query and there are no joins in the queries

          I 1 Reply Last reply
          0
          • P pebrian27

            Nhibernate isn't the cause of the slow query and there are no joins in the queries

            I Offline
            I Offline
            i j russell
            wrote on last edited by
            #5

            500 records in 2 mins with no joins is very very slow. It would appear that either your server is useless or the query optimizer is unable to use indexes and is doing a table scan of all 250million records. Have you looked at the query execution plan to see if there are indexes that you can add?

            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