Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
Cristian,
>I decided to use this index on some tables, since I had to set deldted on. I assumed that when querying data this would give a performance advantage. The tables involved are not that big. I thought that this index only causes problems on large tables. Is there no performance advantage whatsoever? There was a lot of discussion, but still it's unclear to me.
In most cases, there is no mesurable performance advantage. On a network, you'll notice the negative impact of the DELETED() tag much earlier than on a local workstation. some rules:
When there are no or not much deleted records the DELETED() tag will not give you any performance advantage unless:
- You're using COUNT to count record when SET DELETE = ON with full optimization
- You want to use FILTERED SQL resultsets generated by a SQL SELECT command with full optimization
When omiting the DELETED() tag:
- Your tables open faster when SET DELETE = ON
- Performance of INSERTs and DELETEs is much better
- You do not have the chance of having a corrupted DELETED() index
It all has to do with the fact that the rushmore optimizer uses every index available when trying to optimize a command. When you've got a million record table and open this table, it has to download all indexnodes for every non-deleted record before it gives control back to VFP. If this happens on a network, it will slow down the process because a lot of network traffic is generated with no benefit or whatsoever.
Walter,
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only