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

Filtered index

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

    Filtered index

    What is a filtered index and how would you use one?

    I thimk I might be able to take advantage of this if I could fimd some documentation on it.

    Thanks for any input
    Failure makes improvements

    #2
    Re: Filtered index

    John, there's not much available on this in the helps. Check the help file topic:

    About Indexes, Queries, and Ranges

    In previous versions folks have experienced index corruption using filtered indexes. I also recall other posts where unexpected results occurred. i.e. user "loses" a record because the index key value no longer meets the filter criteria. Record isn't lost just not available while the filtered index is controlling the view of the table. Others ran into trouble using a filter expression based on a variable, expecting the index list to be updated whenever the variable changed. Much trouble lies there. So, I've steered clear of them in my own apps. Don't use them. Don't recommend them. If you have a good experience with them write back and tell us more about your app and how you are using a filtered index. Thanks.

    Comment


      #3
      Re: Filtered index

      I'll give them a miss then.

      A large part of my business hinges on a filter with two variables in it.

      Thanks for the advice

      John
      Failure makes improvements

      Comment


        #4
        Re: Filtered index

        If the variables have known constant values, and are either one or the other, you might try separate filtered indexes with fillters based on the constants. i.e. separate indexes for each known constant. However, this is something I don't have personal experience with.

        Comment


          #5
          Re: Filtered index

          Hello Tom

          No the variables are constantly changing from one customer to another.

          Its a start date and an end date that I get from fields on a form that then allows me to create a filtered available stock list.

          Basically a reservations app. I've tried many times to get help with this to allow me to deploy more than one reservation pc on my lan but to date can only get it to work on one pc.

          John
          Failure makes improvements

          Comment


            #6
            Re: Filtered index

            Deployment to multiple workstations on the same LAn is ordinarily not an issue. However, it's off topic for this thread, so consider beginning a new thread if you have questions in that area. Thanks. -- tom

            Comment


              #7
              Re: Filtered index

              As Tom indicated, many users have had issues when a filtered index is used....seems that they tend to corrupt a bit easier than non-filtered. I also shy away due to the possibility of problems.

              That said, I have had an application which, due to the speed issue of using Tablesum() which will take a necessary filter, I ended up using the faster dbsum() which uses an index...and used a filtered index to accommodate what I needed....so far no corruption and is twice as fast as tablesum().

              Just wanted to point out that there are times in which a filtered index makes sense.
              Mike
              __________________________________________
              It is only when we forget all our learning that we begin to know.
              It's not what you look at that matters, it's what you see.
              Henry David Thoreau
              __________________________________________



              Comment


                #8
                Re: Filtered index

                Thanks, Mike. How about showing us the filter expression you're using? Does it employ constants or variables? -- tom

                Comment


                  #9
                  Re: Filtered index

                  I looked and all are referencing constants/field values. Here are the main 4, some used repetitively for more than one table/index.

                  Code:
                  UNIQUE_KEY_VALUE()
                  ALLTRIM(LEVEL)="T"
                  .NOT.(CONTAINSI(ACCOUNTNAME,"Total"))
                  ALLTRIM(LABEL)="Total Expense"
                  Mike
                  __________________________________________
                  It is only when we forget all our learning that we begin to know.
                  It's not what you look at that matters, it's what you see.
                  Henry David Thoreau
                  __________________________________________



                  Comment


                    #10
                    Re: Filtered index

                    Right. I think that's an important point. thanks for giving us the examples.

                    Comment


                      #11
                      Re: Filtered index

                      Thinking on this a bit more Tom.....considering how easily it could be for a variable to be "missing" which would make the index unresolvable/error out, I can see where this would cause the index to corrupt....makes me wonder about the corruption issues in prior threads and if most/all involved variables in the filtered index.......
                      Mike
                      __________________________________________
                      It is only when we forget all our learning that we begin to know.
                      It's not what you look at that matters, it's what you see.
                      Henry David Thoreau
                      __________________________________________



                      Comment


                        #12
                        Re: Filtered index

                        Right, but it's even worse than that. When a record is saved the indexes are updated automatically. They're not rebuilt, though. Instead the index figures out where the record belongs in the list using the index tag expression. If the index is "filtered" with a variable, whether the record is even included in the list in the first place depends on whether it matches the filter criteria at the time of the save. This is determined on saving not on viewing later on, so to speak. So, if the current record fails to meet the index filter criteria it won't be included in the index. Later on, if the variable changes to something that might include that record (if it were to be saved to the table), the record remains invisible. It's not in the list so its not in the list. The index doesn't get rebuilt when the variable changes. See the problem?

                        Comment


                          #13
                          Re: Filtered index

                          Makes sense. So using a variable could possibly be used if the developer adds in code to rebuild the index at the appropriate times....naw.. :) , I'm not even going to consider doing that myself....will stick with a simple filtered index and then only when no other easy alternative (Ira did give me a possible alternative a while back in case I ran into the index corruption, but have not utilized it ever.).
                          Mike
                          __________________________________________
                          It is only when we forget all our learning that we begin to know.
                          It's not what you look at that matters, it's what you see.
                          Henry David Thoreau
                          __________________________________________



                          Comment


                            #14
                            Re: Filtered index

                            Right again. the index rebuild would require exclusive lock on the table, so it's not practical work around.

                            Comment

                            Working...
                            X