Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Enhancement: SQL-stabilty for better readability and (perhaps) plan stability

    Hi Isomorphic,

    I noted that the order of fields in the generated SQL is random (or random looking to the user). I suppose that this is because during parsing of ds.xml-files you internally use some Java collection type not guaranteeing insertion-order when iterating.

    If there is no reason for this I'm not seeing right now (speed can't be an issue for these small lists), it might be a good idea to replace the use of java.util.HashSet(?) by java.util.LinkedHashSet(?).

    That way one would get a comprehensible SelectClause. The WhereClause is already stable from my feeling.

    Besides being comprehensible, the SQL would also be able to profit from (Oracle) Plan Baseline features. I'm not using that (still developing on Oracle XE ;) and don't think that I'll ever use it (especially not with SmartGWT, where the generated SQL and WhereClause tends to differ for every user interaction).
    Having said that, this enhancement (for me) is just a purely cosmetic improvement, but for other users (on Oracle Enterprise Edition) this might have some practical use.

    What do you think about this?

    Best regards,
    Blama

    #2
    This is changed now. The order of fields in selectClause will reflect the order of fields in ds.xml config.

    Comment


      #3
      Hi Isomorphic,

      I can confirm that the output is now ordered (using 4.1p 2014-04-07), but not in the way you describe.

      I have a .ds.xml with some FKs and includeFrom. The order in the $SelectClause is:
      1. "normal" fields from the current DS in alphabetical order
      2. "includeFrom" fields in the order of definition

      where, according to your reply and better understandable, it should be
      1. all fields from the .ds.xml in the order of definition


      Best regards,
      Blama

      Comment


        #4
        Hi Isomorphic,

        FYI: This is still as described in my last post (now using v9.1p_2014-07-10), in case you want you change this.

        Best regards,
        Blama

        Comment


          #5
          Hi Blama,

          We assumed this was not critical change and it was made only for the latest version. Since you've mentioned it again, it is now ported to 9.1 as well, so you may download next (2014-07-12) nightly build and try it out.

          Have a nice day!

          Comment

          Working...
          X