Professional tools for Firebird optimization and maintenance
from IBSurgeon
Alexey Kovyazinwww.IBSurgeon.com
2
• Tools and consulting• Platinum Sponsor of Firebird Project• Founded in 2002: 12 years of
Firebird and InterBase recoveries and consulting
• Based in Moscow, Russia• Firebase is our Brazil partner (since
2006)
3
Backups
Health monitoring
Indices maintenance
Transactions dynamics
SQL Queries & plans
Database structure analysys
Database
Typical tasks
4
FBDataGuard
IBTM
FBScanner & FBPerfMon
IBAnalyst
5
Backups● GBAK or NBACKUP?
● NBACKUP problems● GBAK problems
● How to combine advantages and avoid problems
Backups
6
Big databases backup schema
Production server Backup server
FBDataGuard 1:-delta monitoring
-health monitoring
FBDataGuard 2- gbak backup & test restore
Nbackup gbak
7
Health monitoring
• Critical metadata check and backup– Needed for recovery with FirstAID
• Database limitations checks– Transactions limits, format limits, space limits
• Errors– Firebird.log
8
Indices maintenance
• Indices health– Idea of statistics – Recalculation of indices statistics
• Manual• Automatic
9
Transactions monitoring 2
• Transaction markers (NEXT, OIT, OST, OAT) dynamics is good indicator of problems– Long running active transactions (stuck OAT)– Forced Rollback (stuck OIT)– Sweep and autosweep success
10
11
SQL Queries and Plans
• For all Firebird versions — FBScanner– Works as a proxy– Connection string changes required– Can be installed on remote server
• For Firebird 2.5 — FBPerfMon– Mon$ support– TraceAPI support
12Recommended setup for logging
Firebird Production server
Users
FBScanner remote server
Administrator has:1) FBScanner Analyzer2) MON$Logger3) TraceAPI4) IBTM5) IBAnalyst
MON$
TraceAPI
FBDataGuard& Trace API
13MON$
14Trace
15
FBScanner Log
16Database structure
17Examples of problem resolution
1.Long running active transaction — prevent performance problem1.Administrator got email from FBDataGuard about
transaction gap2.IBTM shows long running active transaction3.MON$ logger identified source of transaction, and
admin disconnected client
18Examples of problem resolution
1.Bad performance — fix performance problem– User reported problem with performance in application A– Quick check with MON$logger does not show the
problem– Admin analysed logs from FBScanner (permanent
monitoring) and found bad query, reported to developer, with SQL plan and fresh gstat statistics from FBDataGuard
– Developer checked gstat and plan, found that new index is needed
– After testing index on test machine developer passed new index to admin
– Admin applied index, performance is good again
19
Conclusion
• To sleep well and live long you need:– Relialble backups– Continious monitoring and alerts– Quick identification of problem– Full details how to fix it
20
Only at FDD 2014
IBSurgeon Optimization Pack 5-in-1 (FBDataGuard+FBScanner+FBPerfMon +IBTM +IBAnalyst)
• EUR 299 R$400 per server• EUR 1290 R$850 Unlimited Subscription 1 year
Top Related