a timed query

  • I have 10pc's requesting the same query on a LAN every second or so.

    Is possable for sql to run that query on a second by second basis, so its looped and send to excel spreadshaeets on the LAN

    Or

    Have the query running every second then update a table so then the other PCs are only pulling the table, so the table will only have 1 record in it per field, therefore making it run alot faster

    Jon

  • I am pretty sure it can be done but the real question might be why do you want to fire off a query every second? If you want to provide details I can take a look and see what might be a good solution.

  • the sql database is tracking stockmarket volume's traded on stocks.

    And is for use in a charting package

    excel is likes the charting package to sql via a query

    so i use excel to call sql every second as i am trackingthe stock market in realtime, and speed is everything, 1 second delay is enough though

    but as i join more computers to the lan sql will slow down, if i keep sending the same query from every pc

    I could post my query here but it is getting long now

  • You don't have BizTalk in your environment, do you? If so, you may look at utilizing it. BizTalk was intended for this sort of thing.

    On a related note, if you are using SQL Server 2005, you may want to see if you can leverage Service Broker to be able to tell clients when they check in if data has been updated or not.

    K. Brian Kelley
    @kbriankelley

  • Sounds to me like a perfect use for a web page with a data caching mechanism built in - just expire the cache every second and force a client refresh in the html. If you're displaying a rolling average or something it's just as easy to keep X number of seconds in memory, dump the oldest and get the latest once each second...

    You'll end up with much lighter hit on your database server, no need to have Excel running constantly on X number of desktops and an app that should scale pretty nicely.

    Not exactly sure what you're updating in Excel (e.g. are you retrieving/displaying a rolling history or just a single value?) but anything you can show/display in Excel should be pretty straightforward to duplicate in an ASP/ASP.Net page. Heck might even be kind of fun to write.

    Joe

  • I was thinking webpage, but thats a bit later, for now i wanted to concentrate on excel sql, i have 1 sending PC and 4 recieving, excel is ideal because the charting package can read from excel, is just getting the best solution

  • Not exactly sure what you're updating in Excel (e.g. are you retrieving/displaying a rolling history or just a single value?) but anything you can show/display in Excel should be pretty straightforward to duplicate in an ASP/ASP.Net page. Heck might even be kind of fun to write.

    I its just a single vale, well lot of single values, but the more PC's I add the more work sql will be doing, i know webpage is a good i idea but that is probably later for now i really like to find the best way in excel, at the very least it improves my knowledge

  • Why Excel? Take a flier at learning how to do it in .Net... if you don't already have Visual Studio you can pick your flavor to download on trial from MS... VS 2005/2008... charting in an .Net page is pretty straightforward and there are tons of relatively inexpensive charting packages (e.g. Dundas) if you can't find one to do it for free.

  • I dont chart in excel i chart in a charting package built for realtime data from the stockmartet, excel is just a medium for referencing data

  • jon pill (11/16/2007)


    I dont chart in excel i chart in a charting package built for realtime data from the stockmartet, excel is just a medium for referencing data

    And most financial types live in Excel.

    K. Brian Kelley
    @kbriankelley

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply