Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binary indexes - anyone taking advantage?
Message
 
 
To
05/05/2006 14:08:51
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01119670
Message ID:
01119716
Views:
17
>If you're pulling that deleted tag data over the wire, then no. If you're going to have a local machine process local data then yes. If you're going to have a server remotely process queries and return data, then yes.
>
>I believe in VFP9 you can now INDEX ON DELETED() FOR DELETED() TAG IXDELETED BINARY (REMEMBER NOT TO USE KEYWORDS)
>
>That means the amount of data flow from the server to the pc on the LAN goes way down, so you could potentially use that too and have the deleted tag all the time.

I'm not sure I follow you exactly.

First of all,
A binary, or bitmap, index is used for creating indexes based on
logical expressions, for example, indexing deleted records, and is
supported for free and database tables. However, binary indexes do not
support the following:

Using index expressions that evaluate to null.
Using FOR clause filter expressions.
Changing the order in which records are displayed and processed,
for example, by using the ASCENDING, DESCENDING, UNIQUE,
or CANDIDATE keywords.

Setting binary indexes as controlling indexes, for example,
by using the SET ORDER command.

Performing ordering and seek operations.


Secondly

To help ensure that queries use Rushmore optimization, some developers create an index tag for deleted records by using the DELETED( ) function in the index expression. The DELETED( ) function determines whether a record is marked for deletion. For example, the following code creates an index named Deleted using an index expression that includes the DELETED( ) function that selects records marked for deletion:

Copy Code
INDEX ON DELETED() TAG Deleted


However, performance issues can still exist with this method, usually when working with large data sets in a LAN/WAN networking environment where deleted records are scattered in a table and when transmitting a large index over the network.

Instead, you can create and use a binary index, which optimizes the bit that marks records for deletion, to improve performance when you set the SET DELETED command to ON. You can create a binary index by choosing the Binary index type in the Table Designer or by including the BINARY keyword in the INDEX command. For example, the following code creates a binary index named myDeleted that selects records marked for deletion:

Copy Code
INDEX ON DELETED() TAG DeletedTag BINARY


We have the server, where our database resides. The application itself is installed on each user's PC. Some queries are executed quite slow. We're using SET DELETED ON everywhere despite the fact, as I said, we're not really deleting records, we deactivating them using iActiveFlag.

I was trying to perform some tests adding and removing these indexes and the results are not conclusive. It looks like these indexes slow down the operations.

In our main table Trans we have lots of indexes. Other tables have ~ 5 tags in average.

BTW, it looks like these portions of Help were never proof-readed.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform