Discussion:
[firebird-support] Data pages and data page slots
'Walter R. Ojeda Valiente' sistemas2000profesional@gmail.com [firebird-support]
2016-12-13 07:59:31 UTC
Permalink
Hello everybody

When I run GSTAT with the switch -data it shows me numbers after "data
pages" and "data page slots".

Usually these numbers are the same, but ... what happen when they are
different?

I understood that the difference between them means the count of pages
without any relevant data. Pages allocated some time and not more useful
for that table at this moment because they just have garbage.

However, if I want to delete those pages, it is not possible, neither with
GFIX -sweep neither with a SELECT COUNT(*) FROM MyTable

In both cases GSTAT -data continues showing the same numbers.

For example, I have a table whose "data pages" is 72 and their "data page
slots" is 975,

Is there something wrong there? Is possible (and useful) make these numbers
equals? which is the meaning of those numbers?

Someone can explain me that or tell me where I can find information? Mr
Google was not polite with me.

Of course, I know a cycle backup/restore put both numbers equals, but ...
is that the only way? or I can make "data pages" equal to "data page slots"
without a cycle backup/restore?

Greetings.

Walter.
Dimitry Sibiryakov sd@ibphoenix.com [firebird-support]
2016-12-13 10:28:02 UTC
Permalink
Post by 'Walter R. Ojeda Valiente' ***@gmail.com [firebird-support]
Is there something wrong there?
No.
Post by 'Walter R. Ojeda Valiente' ***@gmail.com [firebird-support]
Is possible (and useful) make these numbers equals?
Yes: fill database with useful data.
--
WBR, SD.


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-***@yahoogroups.com
firebird-support-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-***@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
hvlad@users.sourceforge.net [firebird-support]
2016-12-13 15:25:33 UTC
Permalink
When I run GSTAT with the switch -data it shows me numbers after "data pages" and "data page slots". >
Usually these numbers are the same, but ... what happen when they are different?
Physical numbers of data pages stored at kind of array and data of this array are split over
pointer pages. Every item of array also called "slot". Slot could be empty or contain data page
number. When table grows, engine allocates new data pages and put its numbers into empty
slots (allocating pointer pages when necessary). When data pages is freed, slots become empty
but they are still present. Pointer pages freed only when table is dropped. Therefore number of
"data page slots" could be much larger than number of "data pages".

Hope it helps,
Vlad
'Walter R. Ojeda Valiente' sistemas2000profesional@gmail.com [firebird-support]
2016-12-13 18:32:02 UTC
Permalink
Thank you very much Vlad, that is what I was thinking but always is very
better to have the explanation of one expert.

Greetings.

Walter.
Post by 'Walter R. Ojeda Valiente' ***@gmail.com [firebird-support]
Post by 'Walter R. Ojeda Valiente' ***@gmail.com [firebird-support]
When I run GSTAT with the switch -data it shows me numbers after "data
pages" and "data page slots".
Post by 'Walter R. Ojeda Valiente' ***@gmail.com [firebird-support]
Usually these numbers are the same, but ... what happen when they are
different?
Physical numbers of data pages stored at kind of array and data of this
array are split over
pointer pages. Every item of array also called "slot". Slot could be empty
or contain data page
number. When table grows, engine allocates new data pages and put its numbers into empty
slots (allocating pointer pages when necessary). When data pages is freed,
slots become empty
but they are still present. Pointer pages freed only when table is
dropped. Therefore number of
"data page slots" could be much larger than number of "data pages".
Hope it helps,
Vlad
Loading...