Board index » delphi » page_sizes

page_sizes


2005-06-02 03:39:09 PM
delphi255
Hello there,
What is the purpose of creating databases with different page sizes.
--
Best Regards
Camilla Wiklund
Vågagenturen Wånelid AB
Väx: 0511-130 95
Dir: 0511-130 97
XXXX@XXXXX.COM
 
 

Re:page_sizes

"Camilla Wiklund" <XXXX@XXXXX.COM>writes:
Quote
What is the purpose of creating databases with different page sizes.
If your record size is 7K and you use 2K blocks, the db has to make 4
reads to get the record - if the record size is 8K, then there's only
one - that is the general idea. I am sure that someone will correct this
if it is wrong!
Paul...
--
plinehan __at__ yahoo __dot__ __com__
XP Pro, SP 2,
Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.2.0;
When asking database related questions, please give other posters
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't work!").
Thanks.
Furthermore, As a courtesy to those who spend
time analysing and attempting to help, please
do not top post.
 

Re:page_sizes

IMHO this is one of those things which the server should manage
internally and not bother the user / DDL author with.
Practically speaking, the page size affects a lot of things, but there
is seldom a reason not to use the largest page size available except
for special circumstances. Barring unusual circumstances, the only
thing you really need to consider about page size as a server admin is
that it affects the amount of memory used by the buffers setting, which
is specified in terms of DB pages. So if you have 50000 buffers and
you're using a DB page size of 4096, then IB will reserve 50000 * 4096
bytes of memory for the cache for all attachments to that DB (presuming
SuperServer architecture).
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
 

Re:page_sizes

Can the selected page_size affect the post and search time of a record in a
table that is growing with 200 records/day?
I have made an application that is used in such environment and now when the
actual table hav 94400 records it takes 10 seconds to post a record because
I do som calculations and counts all posts before i post the record to set
some current status.
I use Delphi 5 and Interbase 6.0 wich are running on an XP machine. Is there
anything I can do to minimize that time?
Camilla Wiklund
"Paul" <XXXX@XXXXX.COM>skrev i meddelandet
Quote


"Camilla Wiklund" <XXXX@XXXXX.COM>writes:


>What is the purpose of creating databases with different page sizes.


If your record size is 7K and you use 2K blocks, the db has to make 4
reads to get the record - if the record size is 8K, then there's only
one - that is the general idea. I am sure that someone will correct this
if it is wrong!


Paul...


--

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2,

Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.2.0;

When asking database related questions, please give other posters
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't
work!").
Thanks.

Furthermore, As a courtesy to those who spend
time analysing and attempting to help, please
do not top post.
 

Re:page_sizes

Hello, Camilla!
Camilla Wiklund writes:
Quote
Can the selected page_size affect the post and search time of a record in a
table that is growing with 200 records/day?
use 4 or 8 K page size. don't use 1K page size.
Quote
I have made an application that is used in such environment and now when the
actual table hav 94400 records it takes 10 seconds to post a record because
I do som calculations and counts all posts before i post the record to set
some current status.

I use Delphi 5 and Interbase 6.0 wich are running on an XP machine. Is there
anything I can do to minimize that time?
Depends on your queries.
--
Dmitri Kouzmenko, www.ibanalyst.com
 

Re:page_sizes

Camilla Wiklund writes:
Quote
I use Delphi 5 and Interbase 6.0 wich are running on an XP machine.
Is there anything I can do to minimize that time?
Yes, read my three optimization articles:
blogs.teamb.com/craigstuntz/articles/IBOptimization1.aspx
blogs.teamb.com/craigstuntz/articles/IBOptimization2.aspx
blogs.teamb.com/craigstuntz/articles/IBOptimization3.aspx
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
 

Re:page_sizes

After reading Craig's papers, consider using triggers to keep a count
of the number of records in the table instead of using SELECT COUNT(*).
--
Bill Todd (TeamB)
 

Re:page_sizes

Camilla Wiklund writes:
Quote

I have made an application that is used in such environment and now
when the actual table hav 94400 records it takes 10 seconds to post a
record because I do som calculations and counts all posts before i
post the record to set some current status.
If you are selecting counts then this will get progressively worse, SELECT
COUNT is very expensive in a versioning database like InterBase.
If you tell us what purpose such counts are needed, perhaps alternatives can
be offered.
--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: www.logicfundamentals.com/RADBooks.html
Bandwagons are like streetcars, there'll be another along in a few
minutes.