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



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


  • Filter
  • Time
  • Show
Clear All
new posts


    Can anyone suggest a good primer on how the dbf indexes work, and thus how they can be optimized. I'm sure it's a form of B-tree setup but the particulars like cardinality, and selectability are unkown(s) to me at least.

    Re: Indexes

    not sure about a primer, but:

    I like simple indexes without filters. They just seem to work better.

    It is a good idea to have an index on fields that would connect 2 or more tables in a set.

    The indexes are save in a cdx file on disk.

    I believe you can create and delete indexes on the fly with code.

    Yoy can also use a query which basically filters records into or out of whatever you need the data for

    Lightning query can be set up and there are some good threads on here to look that up.

    Good luck

    Others are probably more knowledgeable than I on this, but these are the basics.

    Btrieve was fast, wasn't it??

    Dave Mason
    [email protected]
    Skype is dave.mason46


      Re: Indexes

      Not sure what you mean by optimizing indexes. Here's the primer on optimal use of indexes. You would need to prioritize your expected query usage.

      The downside to indexes is that they must be updated as records are added. Updating requires (due to possible hardware issues) preserving the current index file, building the new index file, removing the old index file. For several index tags on a large file this can be a significant amount of processor time.

      Watch the blue progress bar creep on a ten-fifteen million record 1.6 gig file a few times and you'll reconsider the actual need for all of the indexes.
      There can be only one.


        Re: Indexes

        Dave, Stan, thanks for the feedback,
        My experience is that good index management and usage can boost performance, and poor index usage can indeed wreak havoc.
        I'll study up and test the lightning query (Something I had read about but had forgotten).
        Often I have seen posts in respect to Alpha's speed, and I suspect the real problem is many users and developers not using indexes and other features appropriately.
        Note: I have one operation that processes, 200,000 records at button press and release speed, but another very similar operation, takes enough time that I can make an drink a coffee etc.


          Re: Indexes

          The short answer is the fewer indexes the better and if you have an issue with speed/reliability, move to SQL. MS SQL 2008 Express is free -- as are a couple other SQL DBs.

          I plan on sticking with DBF to begin with but as the files grow, reassess my options.

          Greg Wood


            Re: Indexes

            That's a good question, unfortunately there is no good answer, not in Alpha and perhaps not in any other DB. I don't believe you could control how a B-Tree is structured. It's an internal function of the DB. Alpha certainly uses B-Trees for indices, unfortunately there is no way for you to know what scheme regarding Cardinality & selectability is used except if you have the patience to add one record at a time and try to make some sense out of it. And assuming you figured it out, it won't help you a bit as you cannot change that scheme. I venture to say that most B-Trees operate at the same scheme but as to how wide and how deep, it's really a question for the ages.

            From a practically point of view, you need to decide:
            Do you really need an index?
            That's a tough question to answer. Programmers figured out that if an object could travel at the speed of the light, you cannot make it travel faster than that but you could make it look like it does. How?
            The best example is how webpages load.
            Sorry,...have to go. Will finish this worthless banter later..


              Re: Indexes

              "G Gabriel"
              I'm finding indexes to be like a black box that I keep putting things into but I have no idea of what happens to them in the inside.
              Regularly I create new indexes and have no idea whether I have created them optimally, or near optimally.
              What I'm looking for is some general rules as per the lightening query page that suggest how to treat and use indexes.


                Re: Indexes

                Related to but not your original question -

                The Alpha help file has tons of info. I think around 8700+ pages. I remember finding a write up on index -- and couldn't find it. But I did find another one.

                Help -> Getting Started -> About Indexes, Queries, and Ranges

                Two things that I found in that article:
                1. Indexes work on primary files, not sets. If I read that right, you can't build an index that bridges two primary files even if they are joined by the set.
                1. Queries are static snapshots and updates are not automatically maintained by Alpha.


                  Re: Indexes

                  Originally posted by ColinJD View Post
                  "G Gabriel"
                  I'm finding indexes to be like a black box that I keep putting things into but I have no idea of what happens to them in the inside.
                  Regularly I create new indexes and have no idea whether I have created them optimally, or near optimally.
                  What I'm looking for is some general rules as per the lightening query page that suggest how to treat and use indexes.
                  I owe you an apology. I think I , unwittingly, must have offended you with the remark "worthless banter". I was referring to my part of it, not yours. The problems, when you start talking about indices, it could go on and on and I felt that I started doing that and wasn't getting anywhere fast.. so I dropped it for later time.

                  Just a quick mention, you could create your own indices with your own parameters, only problem with that is: How are you going to use them in alpha? You pretty much have to re-write all the indices functions used. But again, it's doable. Would it make much difference? I doubt it, which takes us back to the original question: do you really need an index?
                  When time allows, we could explore that further..


                    Re: Indexes

                    Indexes become critical when queries are done on very large files. The necessity for an index sometimes does not become apparent until a table has a very large number of records A well designed index invoking LQO can make queries run hundreds of times faster than without.

                    As far as the speed of operations goes, there is an article in the newsletter archive which discusses speeding up operations.I suggest you read it and see if the suggestions in the article apply to your situation.