FireBird 设置PageBuffer & Procedure

Top site:

http://www.destructor.de/firebird/index.htm

Set Database Page Buffers

command line tools

The administrative tools that are available with the software are:
• gsec - This is the security administrator. You will use this command-line tool for creating, modifying and deleting database users, changing passwords, etc.
• isql - This is the interactive SQL tool, similar to Oracle’s SQL*Plus and Postgresql’s psql command. You can use this to test or run SQL queries. [Ed.- along with several other jobs!]
GFIX - Firebird’s command line tool for administration issues like data repair, sweeping, etc.
gfix -buffers 8000 -user “SYSDBA” -password “masterkey” D:\DBFolder\vk6\Firebird\VK5TOVKC2Dev.GDB
gstat D:\DBFolder\vk6\Firebird\VK5TOVKC2Dev.GDB

sql
select * from MON$DATABASE;

Server Configuration File–firebird.conf

Optimized Firebird Configurations

#
# Firebird configuration file for Firebird 2.5 64-bit SuperServer
# Optimized by IBSurgeon (www.ibsurgeon.com).
#
# This is an optimized configuration for Firebird 2.5 SuperServer 64 bit, it can be used
# instead of standard firebird.conf from 2.5 distribution - copy it to Firebird folder,
# rename it to firebird.conf, then restart Firebird 
# (all users should be disconnected before restart!). Keep old config as a backup!
#
# If you need configuration file, optimized for your specific environment 
# to get the best possible performance, or if your performance problem 
# still persists after configuration changes, contact us:
# http://www.ibsurgeon.com/en/firebird-interbase-performance-optimization-service/
# or via email support@ib-aid.com
#RootDirectory =
#DatabaseAccess = Full
#ExternalFileAccess = None
#UdfAccess = Restrict UDF
#TempDirectories =
#LegacyHash = 1
#Authentication = native
#AuditTraceConfigFile =
#MaxUserTraceLogSize = 10
DefaultDbCachePages = 9999
#DatabaseGrowthIncrement = 134217728
#FileSystemCacheThreshold = 65536
#FileSystemCacheSize = 0
#RemoteFileOpenAbility = 0
TempBlockSize = 2048576
TempCacheLimit = 967108864
#CompleteBooleanEvaluation = 0
#DeadlockTimeout = 10
#MaxUnflushedWrites = 100
#MaxUnflushedWriteTime = 5
#BugcheckAbort = 0
#OldColumnNaming = 0
#OldSetClauseSemantics = 0
#RelaxedAliasChecking = 0
#ConnectionTimeout = 180
#DummyPacketInterval = 0
#RemoteServiceName = gds_db
#RemoteServicePort = 3050
#RemoteAuxPort = 0
#TcpRemoteBufferSize = 8192
#TcpNoNagle = 1
#RemoteBindAddress =
#LockMemSize = 1048576
#LockGrantOrder = 1
#LockAcquireSpins = 0
LockHashSlots = 20011
#EventMemSize = 65536
#CpuAffinityMask = 1
#UsePriorityScheduler = 1
#PrioritySwitchDelay = 100
#PriorityBoost = 5
#GCPolicy = combined
#GuardianOption = 1
#ProcessPriorityLevel = 0
#IpcName = FIREBIRD
#RemotePipeName = interbas
#Redirection = 0

Stored Procedures in Firebird

SET TERM

Every command in a script must be terminated by a semi-colon, the procedure itself, too. To distinguish the semi-colons in the procedure from the terminating semi-colon, there must be another terminator for the end of the procedure. This is done
with SET TERM:
SET TERM !! ;
CREATE PROCEDURE x AS BEGIN ... END !!
SET TERM ; !!

SUSPEND

Only for SELECT procedures which return tables: Waits for the client to request the next line. Returns the next line to the client.
Examples
/* --- Returning a single value –----------------------------------- */
CREATE PROCEDURE Mul (a INTEGER, b INTEGER)
RETURNS (Result INTEGER)
AS BEGIN
Result = a * b;
END
/* --- Returning a table –--------------------------------- */
CREATE PROCEDURE CountTo10
RETURNS (Cnt INTEGER)
AS BEGIN
Cnt = 1;
WHILE (Cnt <= 10) DO BEGIN
SUSPEND; /* Return next line */
Cnt = Cnt + 1;
END;
END

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值