Subject | Re: [firebird-support] Design for speed |
---|---|
Author | Ann W. Harrison |
Post date | 2006-02-13T16:26:56Z |
Lester Caine wrote:
If the guid's are stored in a byte order that puts the least volatile
bytes first, the compression will eliminate them. Thus, in an imaginary
GUID, you might have fields for galaxy, solar system, planet, computer
manufacturer, computer, and sequence. For numbers generated on a single
computer, only the sequence changes. After the first entry on each
index page, all the fields except sequence disappear into prefix
compression, and only the changing bytes of the sequence change.
Maybe you could measure a difference in performance, but I doubt it.
type. That turns out to be important if you use compression.
data compression eliminates them.
compressing guid fields. Firebird 2 has a much more sophisticated
compression algorithm and uses indexes within indexes to improve
performance on large page sizes.
But, if I can make a suggestion, don't get into a theoretical p*sing
match with the Postgres guys. Build a sample and test it.
Regards,
Ann
>>Faster, but not all that much faster, given index prefix compression.
>>My gut reaction is that Firebird would be faster if these three fields
>>were just INTEGER ( in fact a single byte would do since the three
>>tables are only a couple of dozen types though language could get bigger
>>)
If the guid's are stored in a byte order that puts the least volatile
bytes first, the compression will eliminate them. Thus, in an imaginary
GUID, you might have fields for galaxy, solar system, planet, computer
manufacturer, computer, and sequence. For numbers generated on a single
computer, only the sequence changes. After the first entry on each
index page, all the fields except sequence disappear into prefix
compression, and only the changing bytes of the sequence change.
Maybe you could measure a difference in performance, but I doubt it.
>> This would reduce the record by 52 characters, but having to compareNot an issue indexes. All indexes are compared bytewise, regardless of
>>strings rather than a single integer is surely a slower process.
type. That turns out to be important if you use compression.
>>Null entries are zero or blank filled, depending on type, and run length
>>The other point of discussion is the addition of fields for security and
>>other management functions. These are currently being added as joined
>>tables, on the basis that not all records need to have a group_id or
>>source_id, but when looking at 100k items of content, all of which have
>>these to fields filled in, I can't see how managing a separate
>>content_id/group_id pair in a separate table gives you anything, and
>>even if only 10k of the group_id fields were populated, surely just
>>having NULL entries for the field in the main table is not going to be
>>an overhead?
data compression eliminates them.
>>Wait for V2. It fixes the index duplicate performance problems.
>>Obviously indexing on something like group_id where there may only be 10
>> or 20 values for all 100k records, would be a problem, but is there
>>any way to get round that?
>>Yes in the case of index duplicates. Also yes in the case of
>>Finally - will FB2 give any help in terms of performance when dealing
>>with these sorts of question.
compressing guid fields. Firebird 2 has a much more sophisticated
compression algorithm and uses indexes within indexes to improve
performance on large page sizes.
But, if I can make a suggestion, don't get into a theoretical p*sing
match with the Postgres guys. Build a sample and test it.
Regards,
Ann