Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

LQO speed - Is this compatable?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    LQO speed - Is this compatable?

    I have the following filter expression in a field rule's lookup section.
    Supplier = var->vsuppliername
    I have also tried the following
    between(supplier,var->vsuppliername,var-vsuppliername)
    Do these expression method utilize LQO? I seem to have speed problems with the lookup suggesting that LQO is not being utilized - i.e. In the status bar (bottom of screen) it is counting through the 20000+ records.

    When I use a "static" expression in the field rule's lookup section, the lookup is pretty much instantaneous with no counting and noticeably much quicker than the above methods.
    i.e. Supplier = "Restek"

    In the "lookup" table I have defined an Index called Supplier and have Supplier in the order expression and included ALL

    So my question is, referring to the top two expressions, are my filter expressions compatable to utilize LQO or have I mis-read the information regarding LQO and lost "the plot" trying to get it to work using a "variable" rather then a "static" text

    Any help/clarification on the "LQO and variables method" would be much appreciated

    #2
    RE: LQO speed - Is this compatable?

    Matthew,

    I have been working with this very issue lately. It probably has nothing to do with LQO.

    I think the problem is that the variable is being evaluated for each record which can take time if you have enough records. That the process runs much faster with a string literal in the filter is consistent with this explanation.

    One way to manage this is to use replace_parameters() which does what it sounds like it does: evaluates the variable and substitutes the outcome for the variable; but it only happens once.

    So if your filter is
    Supplier = var-"vsuppliername
    you could substitute
    Supplier = replace_parameters(vSuppliername,local_variables())

    I know this has a big impact on the speed of the process. However, I do *not* know whether the built in field rule will accept this approach. But it is worth a try.

    Please report back. I would like to know how the field rule works out. My efforts have been aimed at Xdialog boxes but the issue was the same: slow with a variable but fast with a literal in the filter.

    Bill
    Bill Hanigsberg

    Comment


      #3
      RE: LQO speed - Is this compatable?

      For LQO, the format of your query must exactly match the format of the index. One way to ensure that this is the case is to define your index (if character, 16 for example) as padr(alltrim(fieldname),16). You then need to ensure that every query sumitted to the index is also padded in the same way. I always use the Between() syntax.

      Finian
      Finian

      Comment


        #4
        RE: LQO speed - Is this compatable?

        Finian,

        Any particular reason for not leaving the index alone and just making the filter:
        replace_parameters(padr(vSuppliername,16," "),local_variables())
        where "16" is the size of the field as defined in the table? (And, of course, the field is a character field.)

        Cal Locklin
        www.aimsdc.net

        Comment


          #5
          RE: LQO speed - Is this compatable?

          The "field rule approach" did not like this method at all. It was painstakingly slow compared to what I have already.

          Comment


            #6
            RE: LQO speed - Is this compatable?

            I tried the padr() approach as you mentioned above, however performance was marginal if not a fraction slower. This time however in the status bar it counted the total number of records in the table as well as the progress % status.

            When I used my original expression
            "b"Supplier = var-"vsuppliername"/b"
            it was only counting the number of filtered records. Maybe i need to look at filtering the lookup table so that it displays less record??

            Comment


              #7
              RE: LQO speed - Is this compatable?

              I tried the padr() expression, while leaving the index alone. It didn't seem to make any difference. For field rule expressions I probably suggest not to use replace_parameters() as a general rule for lookups as it made the process time incredibly slow.

              Comment


                #8
                RE: LQO speed - Is this compatable?

                LQO is being invoked - but Alpha is making a query out of the records that satisfy the filter expression, the more records that satisfy the query, the slower it is.
                If I remember correctly, it would be almost instantaneous if the filter expression was based on the linking fields - I believe Alpha then uses a range and doesn't need to create a query.

                Comment


                  #9
                  RE: LQO speed - Is this compatable?

                  The above interventions explain why I am replacing my more problematic and oft-used field rule lookups with hand-scripted xdialogs.

                  In a network situation with medium-large tables I haven't been able to get the field rule lookups with variables in the expressions to work fast enough.

                  This doesn't mean there isn't a way--just that I don't know it.

                  Bill
                  Bill Hanigsberg

                  Comment

                  Working...
                  X