Data Management

Making Actian Zen Btrieve API Code More Efficient

Actian Corporation

March 9, 2018

Actian Zen Hybrid Integration Manager - Performance testing production workloads for Ingres and Vector.

The release of Service Pack 1 for Zen (PSQL) v13, Actian’s zero-dba, embedded nano-footprint database, provides a number of new features, including one we’re looking at today to make Btrieve API code more efficient — the GetNextExtended LIKE Support.

First, let’s review the concept of “Extended Operations.” The low-level Btrieve API (also known as the Microkernel API) supports a set of functions, called extended operations, which allows a developer to quickly obtain many records (or even pieces of records) from the database in a single function call, saving substantially on the number of network requests, and therefore the time needed to retrieve data from the database engine. The extended operations calls also support the concept of “filtering”, which is similar to a SQL WHERE clause — it allows the database engine to read through the records and reject any that don’t meet the specified filter criteria. By limiting the data being sent back to the application to ONLY those records that are needed by the application, further improves performance. GetNextExtended requests can be used automatically within the Magic 4GL development environment, but native API developers must carefully learn how to use them properly to experience these gains. (It is well worth the effort, though!)

So, what is new in v13.10? The extended operations filters now support a LIKE function for substring matching, similar to SQL. You can now find all “Smith” records in your customer database by simply using the LIKE option and searching for “% Smith” records. Or, maybe you want Smithson as well, so you can search for “%Smith%”. Do you want both Smith and Smyth returned? Use “%Sm_th%”! This promises to speed up any UI where the user can enter a portion of a string to look up data.

If you are a developer and think you can start utilizing this function in your own code, you can find more information from the “What’s New Manual” or check out the on-line documentation here. We are hopeful that Actian will start utilizing this new functionality in the SQL engine as well, pushing LIKE filters down into the lower-level MKDE and garnering performance gains there, too.

You can learn more about Zen by visiting the product page here (including information on the new IoT Server for Raspbian and Windows IoT Core) or by visiting the Actian Zen community forums here.

About Actian Corporation

Actian is helping businesses build a bridge to a data-defined future. We’re doing this by delivering scalable cloud technologies while protecting customers’ investments in existing platforms. Our patented technology has enabled us to maintain a 10-20X performance edge against competitors large and small in the mission-critical data management market. The most data-intensive enterprises in financial services, retail, telecommunications, media, healthcare and manufacturing trust Actian to solve their toughest data challenges.