2. Development priorities
● Primary goals
SMP and multi-core friendly multi-threaded engine
with the shared cache
Renewed architecture for the next versions
● Secondary goals
Improved performance and scalability
More security options
Better query optimization
Extended monitoring abilities
SQL language enhancements
3. Shared cache
● Must have
Shared page cache with scalable synchronization
Support for both internal (cross-thread) and external
(cross-process) locking
● Nice to have
Plan A: shared metadata cache,
shared compiled requests cache
Plan B: no shared metadata,
but reduced memory usage
(release cached requests as soon as desirable)
4. Cache Architecture
Process 1 Process 2 Process N
Thread 1 Thread 1 Thread 1
Locking Locking
Thread 2 Thread 2 Thread 2
Thread N Thread N Thread N
Shared Cache Shared Cache Shared Cache
Database
5. Server Architecture
● Unified but flexible
Engine library supporting single major ODS plus
server (aka network listener) executable
loading the engine library
Shared vs exclusive database access:
configurable (per database) via firebird.conf
Execution models available for the shared access
and configurable at the server level (using a
command-line switch):
– process based (former Classic)
– thread based (former SuperClassic)
Embedded access may also be shared or exclusive
7. Architecture in Older Terms
● SuperServer
Exclusive database access, multi-threaded mode
Maximum performance
● SuperClassic
Shared database access, multi-threaded mode
Allow other applications to access the database
● Classic
Shared database access, multi-process mode
Maximum reliability (crash tolerance)
8. ODS 12
● Physical structure
Flag to mark data pages as not having any garbage
(improves sweep performance)
Inventory of the page ↔ SCN relationships
(improves physical backup performance)
RLE compression runs are extended from 128
bytes to 32K (less storage for declared long but de-
facto short or empty strings)
● Logical structure
New system and monitoring tables
9. Optimization
● Algorithms
Cost based approach wherever possible
Efficient joining for streams containing aggregates,
unions and procedures
INNER JOIN for dependent (via input parameters)
procedures now works properly
Hash joins, outer merge joins, indexed full outer
joins
● Cached invariant subqueries
Advanced (much more detailed) plan output
10. Advanced plan output
SELECT statement
-> First [10]
-> Sort [SUM, O_ORDERDATE]
-> Aggregate
-> Sort [L_ORDERKEY, O_ORDERDATE, O_SHIPPRIORITY]
-> Inner Loop Join
-> Filter
-> Table «ORDERS» Access By ID
-> Bitmap
-> Index «ORDERS_ORDERDATE» Range Scan
-> Filter
-> Table «CUSTOMER» Access By ID
-> Bitmap
-> Index «CUSTOMER_PK» Unique Scan
-> Filter
-> Table «LINEITEM» Access By ID
-> Bitmap
-> Index «LINEITEM_PK» Unique Scan
11. Optimization
● Statistics
Table level data: page count, row count, average
compression ratio, etc
Index level data: tree depth, page count, average
compression ratio, clustering factor, etc
Value distribution histograms
Refresh detalization: complete (column level) or
partial (table level)
Manual or automatic (background) refreshing
13. SQL features
● Planned
Bi-directional cursors in API
Enhanced (fixed) long numeric arithmetics
in Dialect 3
Basic optimizer hints
The «unstable cursor» issue to be fixed
Timeouts for queries, transactions, connections
Extended length limit for SQL queries, plans and
result sets
14. Security
● Network level
Pluggable authentication
Over-the-wire encryption
● Database level
Optional per database authentication
(users stored inside the database)
Page level encryption
GRANT ROLE TO ROLE
Implicit roles (aka user groups)
Permissions for DDL operations
15. Release Schedule
● Maintenance
2.0.7 — Q2-Q3 2011,
likely to be the last one in the v2.0.x series
2.1.4 — Q1 2011,
2.1.5 to appear the next year
● New versions
2.5.0 has been released,
2.5.1 to follow Q2 2011
3.0 Alpha 1 — Q3 2011