Version 3 (modified by 15 years ago) ( diff ) | ,
---|
FDO RFC 41 - Fetch Size
This page contains an change request (RFC) for the FDO Open Source project. More FDO RFCs can be found on the RFCs page.
Status
RFC Template Version | (1.0) |
Submission Date | Aug 20, 2009 |
Last Modified | Leaf Li Timestamp |
Author | Leaf Li |
RFC Status | draft |
Implementation Status | draft |
Proposed Milestone | 3.5.0.0 |
Assigned PSC guide(s) | Greg Boone |
Voting History | |
+1 | |
+0 | |
-0 | |
-1 |
Motivation
To allow a client to set the size of the fetch array an FDO provider will use when executing a query.
Overview
For large queries that return a large number of data many feature sources support improving performance by configuring the row fetch size in order to reduce the number database hits required to satisfy the selection criteria. For example, Oracle database and Microsoft SQL Server. However, FDO API always returns all data. In this RFC, we will remove this limitation.
Proposed Solution
The FdoISQLCommand and FdoIBaseSelect interfaces will also be extended to add the following two new methods to get/set fetch size. Because fetch size is a performance tuning parameter and does not alter how feature readers and data readers return data to the caller. So it isn’t added as a new command capability. If one FDO provider doesn’t support fetch size, nothing will happen.
/// \brief /// Gets the fetch size of the data set when executing query against /// the underlying data store. This parameter is typically set in /// situations where large amount of data are expected when a query /// is executed and providers need to minimize the number of returned data. /// For example, fetch 100 rows in one execution step. /// /// \return /// Returns the fetch size. /// FDO_API virtual FdoInt32 GetFetchSize() = 0; /// \brief /// Sets the fetch size of the data set when executing query against /// the underlying data store. This parameter is typically set in /// situations where large amount of data are expected when a query /// is executed and providers need to minimize the number of returned data. /// For example, fetch 100 rows in one execution step. /// /// \param value /// Input the fetch size. /// /// \return /// Returns nothing. /// FDO_API virtual void SetFetchSize(FdoInt32 fetchSize) = 0;
Managed FDO API
The FDO Managed Interfaces will be updated in a similar manner to reflect the proposed changes.
Provider Implementation
SQLite will be enhanced to support it. Update for other providers will be implemented if resourcing and funding can be obtained in the future. Currently empty implementation will be added for those providers.
Test Plan
Run existing FDO core unit tests and expand SQLite unit tests to test the proposed enhancements defined above.
Funding/Resources
Autodesk to provide resources / funding.