Btree Cleaner Question

Btree Cleaner Question

Post by tba.. » Thu, 25 Apr 2002 20:13:22



Hi all,

during an application update I found the following entry under "onstat -C":

Btree Cleaner Info
btcleanr pool     flags pools npend  busypnum head     tail     free
2a723718 0        1     0     0      0        0        0        2ae77bb8

nreqs    dups     success  dfrmv    unnec    ditems   ditlks   cmprs palcs
25174    0        24765    24765    17       160022   117300   4964  167

outstanding requests
address  next     partnum  pagenum  keynum   sequence

Invalidation Requests
count    sequence special
1        13254    1

stamp    partnum  key      pagenum  sequence bucket
653878810 803a80   0        0        13253    2688

Invalidation Hash Table
bin  num prev        node        next     partnum  key      pagenum
sequence
2688 0   2ae65ab0 <- 2ca2a0a8 -> 2ae65ab0 803a80   0        0        13253

 0 pending, 0 total, 16 hash buckets, 0 pools

I would like to know, what is meant by

- Invalidation Request and Invalidation Hash Table !!

Can you give me some more information on this ? When does this happen ?
Does it happen during page flushing ?
Later on there are no more entries.

Thanks in advance.

Torsten

 
 
 

Btree Cleaner Question

Post by Rajib Sark » Fri, 26 Apr 2002 06:16:01


The Version# would have helped ..:-)

It looks you are on 7.31.UD3 ...:-)

Anyway, the INVALIDATION REQUESTS are connected to any EXISTING
REQUEST for which the UNDERLYING TABLE/PAGE/INDEX has been
dropped/merged.

For example, if there is an existing BTREE cleaner request for a TABLE
and you go ahead and drop the table, there will be an INVALIDATION
REQUEST be generated so as to drop the entries for the table cleaned
up from the BTREE CLEANER LIST.

So, in essence this is used to prevent the BTREE cleaner from cleaning
a page/index/partnum/dbspace that has been freed/dropped.

The Invalid Request table shows the order in which the INVALIDATION
REQUESTS were queued and the HASH TABLE shows all the nodes which
belong to the same hash chain.

Hope this clears things a bit ..:-)

Rajib


> Hi all,

> during an application update I found the following entry under "onstat -C":

> Btree Cleaner Info
> btcleanr pool     flags pools npend  busypnum head     tail     free
> 2a723718 0        1     0     0      0        0        0        2ae77bb8

> nreqs    dups     success  dfrmv    unnec    ditems   ditlks   cmprs palcs
> 25174    0        24765    24765    17       160022   117300   4964  167

> outstanding requests
> address  next     partnum  pagenum  keynum   sequence

> Invalidation Requests
> count    sequence special
> 1        13254    1

> stamp    partnum  key      pagenum  sequence bucket
> 653878810 803a80   0        0        13253    2688

> Invalidation Hash Table
> bin  num prev        node        next     partnum  key      pagenum
> sequence
> 2688 0   2ae65ab0 <- 2ca2a0a8 -> 2ae65ab0 803a80   0        0        13253

>  0 pending, 0 total, 16 hash buckets, 0 pools

> I would like to know, what is meant by

> - Invalidation Request and Invalidation Hash Table !!

> Can you give me some more information on this ? When does this happen ?
> Does it happen during page flushing ?
> Later on there are no more entries.

> Thanks in advance.

> Torsten


 
 
 

1. Btree index extension question

Hi, everybody!

I was wonderring if there is somebody out there who could help me with
understand how index extensions work...
Let me state the problem first.

I have many (15) boolean attributes and I need to be able to search the
database for entries with any combination of those attributes for being
true. For example - find all the entries, where a1=a2=a3=true or find
all the entries where a1=a2=a4=true etc...
Because there are so many of them (and the database is HUGE), putting
every attribute into a separate column and creating a separate index on
every possible combination, is really out of the question.
So, I was thinking about creating a single int2 column, with each bit
representing an attribute - so that, the first query I quoted above
would look like "select * from table where attributes & 7 = 7", and the
other query would be
"select * from table where attributes & 11 = 11' etc...

This looked so beautiful to me, but now I am stuck trying to index that
table  [:-(]

I started off, hoping to get away with btrees.

I defined an operator >>=(int2,int2) as 'select $1&$2=$2;'
It looks nice so far, but then the question is - what do I do with the
other operations? By analogy with 'normal' comparison operators, I would do:

 >> (I know the name is taken  [:-)]  as 'select not $2 >>= $1'
=<<                                  as 'select $2 >>= $1'
<<                                   as 'select not $1 >>= $2'
... and leave '=' intact.

But then I realized, that these set of operators, does not really define
a complete order - for example, if I compare, say, 5 and 3:
5 & 3 = 1, 3 & 5 = 1, so I get BOTH 5 << 3 and 5 >> 3 being true at the
same time  [:-(]

So my question is, first of all, is that a problem? Does btree require a
complete order defined? Will it work with partial order?
Secondly, if it is a problem, perhaps, I am missing something here,
assuming that there is no way to define a set of operations to do what I
want and provide a completely ordered set (or do I need it to define a
perfect complete order - what exactly is required for btree to work? Any
ideas?)

And finally, if there is just no way I could get away with btrees, can I
make an rtree to work for me? Could somebody explain to me (or point me
to a doc somewhere) the meaning of the strategies (and requirements -
like transitivity etc...) I need for an rtree, and also what support
functions (like comparison func in case of a btree) do I need?

Thank you very much for your attention.
Any input will be greatly appreciated.

Dima

2. INDEXING PROBLEM

3. Btree indexes. (question)

4. Blob Fields

5. AP btree,xref Question

6. Backing up postgresql databases

7. RECOVER question : how to force to apply logs from a clean but old database back-up

8. VA-No Va-243270--Q/A Testing-UNIX-C++-Java-HTML-ORACLE-Ingres-Apache-Data Wareho

9. temp DB clean up question

10. Question about logging and page cleaners in UDB

11. To Btree or not to Btree, that is the question...

12. What triggers the behavior of the BTRee cleaner thread?