Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Quasar

Members
  • Content count

    7785
  • Joined

  • Last visited

About Quasar

  • Rank
    Moderator

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Single Status Update

See all updates by Quasar

  1. Dunno how many of you have experience with such things, but does this look like a smart way to do this?

    code:
    Array
    The boss is out so I am left to my own devices here ;) Given the amount of data this is going to pull, I can't really fathom doing it with a single update and repeating all those joins in both the set and the where clause of the update - I don't think Firebird 1.5 will be able to pull it off, at least not in a reasonable amount of time (and I am going home at 5:00 if possible :P )

    EDIT: Hrmmm I'd say it's not working:
    code:
    Array
    That was just for the actual update. The rest of it ran quickly. But 2 BILLION fetches? Holy shit. There has to be a better way.

    1. Maes

      Maes

      thedailywtf seems like a more appropriate place for such questions.

      That being said...it does seem like a WTF, or just a fancy way to hide the functioning innards of a database.

    2. Jonathan

      Jonathan

      Well I'm not really a SQL guru but can't you use an inner join in your update to avoid the correlated subqueries? E.g.

      code:
      Array
      That syntax works in SQL Server, dunno about Firebird though.

    3. Quasar

      Quasar

      Jonathan said:

      Well I'm not really a SQL guru but can't you use an inner join in your update to avoid the correlated subqueries? E.g.

      code:
      Array
      That syntax works in SQL Server, dunno about Firebird though.

      I think on Firebird that would update all procedures >_> But I don't know. I'm an SQL n00b myself. However I ended up just eliminating the temp table altogether and using a single update statement that ran in 3 minutes, a significant improvement. It's just a one-time update to fix some procedures that the Behavioral Health dept. never entered in their fee schedule due to laziness ;)

×