User defined functions for database query languages based on call-back functions

    公开(公告)号:US11216454B1

    公开(公告)日:2022-01-04

    申请号:US15411993

    申请日:2017-01-21

    摘要: A parallel database system processes database queries invoking a user defined function (UDF). The database query is specified in a database query language, for example, the structured query language (SQL) and the UDF is specified in a programming language different from the database query language, for example, C/C++. The UDF may include multiple phases. The parallel database system generates optimized code for the UDF. The parallel database system includes a leader node and a plurality of compute nodes. The database query processes one or more database tables such that each compute node processes a slice of each database table. The leader node sets up a global context structure and provides it to each compute node. The global context may be shared across multiple executions of the query. The UDF may be used for efficient execution of extraction, transformation, and loading of data from external systems.

    Scheduling database queries based on elapsed time of queries

    公开(公告)号:US10198292B2

    公开(公告)日:2019-02-05

    申请号:US14463992

    申请日:2014-08-20

    IPC分类号: G06F17/30 G06F9/50

    摘要: A system, for example, an online system or a database system schedules requests received for execution. The system maintains consumer groups and receives a measure of amount of resources allocated for each consumer group. The system maintains a measure of accumulated elapsed time of execution of requests received from each consumer group. If the system determines that resources are available for executing a request, the system selects a request for execution from a consumer group based on the measure of accumulated elapsed time for processing queries for the consumer group and the measure of amount of resources allocated for the consumer group. The system maintains relative cumulative elapsed times of queries across consumer groups in the same ratio as the allocated share for the consumer groups. Accordingly, the system schedules requests such that each consumer group approaches its allocation of resources compared to other groups smoothly over time.

    Optimizing database queries using subquery composition

    公开(公告)号:US09665619B1

    公开(公告)日:2017-05-30

    申请号:US14858957

    申请日:2015-09-18

    IPC分类号: G06F17/30

    摘要: A database system optimizes database queries that comprise subqueries. The database system factors out computation from two or more subqueries to a reusable subquery. The reusable subquery returns a result set. The subqueries are rewritten to use the result set and the database query modified to use the rewritten subqueries. The modified database query performs efficiently since the result set is computed only once for each subquery that uses the reusable query. The database system also composes nested subqueries that compute aggregate values. The database system identifies an inner subquery nested within an outer subquery, each subquery computing an aggregate value. The database system determines a new aggregate function corresponding to a composition of aggregate functions of the inner and the outer queries. The database system determines a composed query using the inner query with the outer query. The composed query uses the new aggregate function.

    PATCHINDEX SYSTEM AND METHOD FOR UPDATABLE MATERIALIZATION OF APPROXIMATE CONSTRAINTS

    公开(公告)号:US20240168944A1

    公开(公告)日:2024-05-23

    申请号:US18392032

    申请日:2023-12-21

    IPC分类号: G06F16/23 G06F16/2455

    CPC分类号: G06F16/2379 G06F16/2456

    摘要: Aspects described herein relate to maintaining a dataset with approximate constraints including determining, for a dataset, a constraint collection of tuples that satisfy a constraint and an exception collection of tuples that are an exception to the constraint, constructing, for the dataset, a sharded bitmap of bits, wherein each bit in the sharded bitmap indicates whether a tuple in the dataset is in the exception collection of tuples, wherein the sharded bitmap includes, for each shard of multiple shards, a bitmap of bits and a starting bit location index within the sharded bitmap of bits for the shard, and processing a query on the dataset including processing the constraint collection of tuples and the exception collection of tuples based on the sharded bitmap.

    METHOD AND APPARATUS FOR STORING OBJECT TOKENS IN A DATABASE

    公开(公告)号:US20220398235A1

    公开(公告)日:2022-12-15

    申请号:US17830052

    申请日:2022-06-01

    IPC分类号: G06F16/22 G06F16/245

    摘要: Examples described herein generally relate to database operations including encoding, within a length field for a first value to be stored in a column of a database as a token that includes information for processing a large object, an indicator indicating that the first value is of a token type, and storing, in the column of the database, the first value with the length field including the indicator.

    PATCHINDEX SYSTEM AND METHOD FOR UPDATABLE MATERIALIZATION OF APPROXIMATE CONSTRAINTS

    公开(公告)号:US20210406251A1

    公开(公告)日:2021-12-30

    申请号:US17358493

    申请日:2021-06-25

    IPC分类号: G06F16/23 G06F16/2455

    摘要: Aspects described herein relate to maintaining a dataset with approximate constraints including determining, for a dataset, a constraint collection of tuples that satisfy a constraint and an exception collection of tuples that are an exception to the constraint, constructing, for the dataset, a sharded bitmap of bits, wherein each bit in the sharded bitmap indicates whether a tuple in the dataset is in the exception collection of tuples, wherein the sharded bitmap includes, for each shard of multiple shards, a bitmap of bits and a starting bit location index within the sharded bitmap of bits for the shard, and processing a query on the dataset including processing the constraint collection of tuples and the exception collection of tuples based on the sharded bitmap.

    Customizing backup and restore of databases

    公开(公告)号:US09892001B2

    公开(公告)日:2018-02-13

    申请号:US14266775

    申请日:2014-04-30

    IPC分类号: G06F17/30 G06F11/14

    摘要: Backups and restore operations of database are customized by performing partial backups and restores. The database maintains information describing database objects that are backed up by subsequent backup operations. The data set that is backed up by backup operations can be modified by executing alter backup commands. An alter backup command identifies one or more database objects and specifies whether the database object should be excluded or included from backup operations. The alter backup command can specify database objects that do not exist in the database. These objects are included or excluded in accordance with the alter backup command whenever they are created in the database. The alter backup command can associate a criteria with a database object in order for the database object to be included or excluded in accordance with the alter backup command.

    PROCESSING DATABASE QUERIES BASED ON EXTERNAL TABLES

    公开(公告)号:US20220277009A1

    公开(公告)日:2022-09-01

    申请号:US17731677

    申请日:2022-04-28

    摘要: A database system processes database queries that process external tables representing data obtained from an external systems. The database system generates an execution plan to execute the database query. The database system sends a request for data of the external table to an external system. The request provides connection information to the external system. The external system sends a request to connect to the database system and provides data of the external table as a data stream. If the database system reaches an operator that processes the data of the external table, the database system waits for data from the external system. The database system processes the database query using the data of the data stream. The database system provides the result of the database query to a requestor, for example, a client device.