Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binary indexes - anyone taking advantage?
Message
From
06/05/2006 11:16:37
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:
01119872
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>>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 FOR clause filter expressions.


That was the part I wasn't sure of, which is why I said "I believe".

>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.

What made by humans is perfect?

In your case, the use of the deleted tag will not help. Pulling index tag data across the LAN is not necessary.
Previous
Reply
Map
View

Click here to load this message in the networking platform