IP Library Granted Patent US 10,007,698
Granted Patent B2
US 10,007,698 · App. 13/687,157 · Granted Jun 26, 2018

Table parameterized functions in database

Inventors: Mark Delafranier (Waterloo, CA); Jeffrey J. Plager (Waterloo, CA); Muhammed Sharique (Margarpatta, IN); Vipul Sharma (Margarpatta, IN); Ivan T. Bowman (Hammonds Plains, CA); Anisoara Nica (Waterloo, CA); Anil K. Goel (Waterloo, CA); Steven A. Kirk (Chelmsford, MA)
Assignee: SYBASE, INC.
G06F17/30442G06F17/3097G06F17/30421G06F17/30864G06F3/0484
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,007,698
App. No.
13/687,157
Filed
Nov 28, 2012
Granted
Jun 26, 2018
Kind
B2
Art Unit
2162
USPC
707/713
Abstract

Systems, methods and computer program product embodiments for providing table parameterized function (TPF) functionality in a database are disclosed herein. An embodiment includes defining a TPF in a database, wherein the definition of the TPF defines one or more parameters of the TPF, at least one of the parameters being a table parameter. A query is received that operates to call the TPF, wherein the query defines one or more input parameters, the input parameters comprising at least one table input parameter to be used as input for calling the TPF. The query is processed to produce a result, and the result of the query is returned.

Claims (64)

1. A computer-implemented method, comprising:

providing table parameterized function (TPF) functionality in a database having defined therein a TPF, wherein the definition of the TPF defines one or more parameters of the TPF, at least one of the parameters being a table parameter;

receiving a query that operates to call the TPF to process information from a producer, wherein the query defines one or more input parameters, the input parameters comprising at least one table input parameter to be used as input for calling the TPF, wherein the table parameter comprises a set of rows from a table of the database;

processing the query to produce a result, wherein the processing comprises executing two or more rows of the table input parameter in parallel;

marking data of the table indicated by the table input parameter that is not to be provided to a consumer as unavailable without deleting the data from a memory structure, wherein the marking of the data of the memory structure consumes fewer processing resources compared to removing the data of the table that is not to be provided from the memory structure; and

returning access to the memory structure as the result of the query, wherein the memory structure includes at least a portion of the data that has been marked as being unavailable.

2. The computer-implemented method of claim 1 , wherein returning the result of the query comprises:

rewinding the result to allow the result to be read multiple times.

3. The computer-implemented method of claim 1 , wherein processing the query to produce a result comprises:

transferring a plurality of blocks of row data using a single call from the producer to the consumer.

4. The computer-implemented method of claim 1 , wherein processing the query to produce a result comprises:

using metadata responsive to the result of a query between the producer and the consumer to improve efficiency by placing restrictions on the information from the database that is used to process the query, wherein the restrictions include the marking.

5. The computer-implemented method of claim 1 , wherein processing the query to produce a result comprises:

negotiating ordering properties for the query between the producer and the consumer, wherein the ordering properties include an already specified ordering for a query input table and an appropriate ordering for the query input table; and

processing the query while enforcing the ordering properties by at least one of the producer and the consumer.

6. The computer-implemented method of claim 1 , wherein processing the query to produce a result comprises:

negotiating partitioning properties for the query between the producer and the consumer;

creating separate instances of the table input parameter, each instance comprising a portion of data from the input parameter; and

processing the query in parallel using the separate instances of the table input parameter.

7. The computer-implemented method of claim 1 , wherein processing the query to produce a result comprises:

negotiating clustering properties between the producer and the consumer; and

processing the query based on the negotiated clustering properties.

8. The computer-implemented method of claim 1 , wherein processing the query to produce a result comprises:

allowing the TPF to dynamically support parallelism or distributed processing when processing the query.

9. The computer-implemented method of claim 1 , wherein the set of rows from the table of the database of the table parameter exist within the database prior to the receiving the query.

10. The computer-implemented method of claim 1 , wherein the processing comprises transferring a plurality of blocks of row data from the producer to a consumer without data movement.

11. The computer-implemented method of claim 1 , wherein the query with the table input parameter is an SQL query.

12. The computer-implemented method of claim 1 , wherein results from the parallel execution of the two or more partitions are assembled into the result.

13. The computer-implemented method of claim 1 , wherein the providing comprises:

wherein the definition of the TPF defines two or more parameters of the TPF including both a table parameter and a single-value scalar parameter.

14. The computer-implemented method of claim 13 , wherein the result of processing the query with the table input parameter is a scalar value.

15. The computer-implemented method of claim 1 , wherein the processing is performed without copying the table input parameter.

16. A non-transitory computer-readable device, having instructions stored thereon that when executed by a processor, cause the processor to perform operations comprising:

providing table parameterized function (TPF) functionality in a database having defined therein a TPF, wherein the definition of the TPF defines one or more parameters of the TPF, at least one of the parameters being a table parameter;

receiving a query that operates to call the TPF to process information from a producer, wherein the query defines one or more input parameters, the input parameters comprising at least one table input parameter to be used as input for calling the TPF, wherein the table parameter comprises a set of rows from a table of the database;

processing the query to produce a result, wherein the processing comprises executing two or more rows of the table input parameter in parallel;

marking data of the table indicated by the table input parameter that is not to be provided to a consumer as unavailable without deleting the data from a memory structure, wherein the marking of the data of the memory structure consumes fewer processing resources compared to removing the data of the table that is not to be provided from the memory structure; and

returning access to the memory structure as the result of the query, wherein the memory structure includes at least a portion of the data that has been marked as being unavailable.

17. The non-transitory computer-readable device of claim 16 , wherein returning the result of the query comprises:

rewinding the result to allow the result to be read multiple times.

18. The non-transitory computer-readable device of claim 16 , wherein processing the query to produce a result comprises:

transferring a plurality of blocks of row data using a single call from the producer to the consumer.

19. The non-transitory computer readable device of claim 16 , wherein processing the query to produce a result comprises:

using metadata responsive to the result of a query between the producer and the consumer to improve efficiency by placing restrictions on the information from the database that is used to process the query.

20. The non-transitory computer readable device of claim 16 , wherein processing the query to produce a result comprises:

negotiating ordering properties for the query between the producer and the consumer, wherein the ordering properties include an already specified ordering for a query input table and an appropriate ordering for the query input table; and

processing the query while enforcing the ordering properties by at least one of the producer and the consumer.

21. The non-transitory computer readable device of claim 16 , wherein processing the query to produce a result comprises:

negotiating partitioning properties for the query between the producer and the consumer;

creating separate instances of the table input parameter, each instance comprising a portion of data from the input parameter; and

processing the query in parallel using the separate instances of the table input parameter.

22. The non-transitory computer readable device of claim 16 , wherein processing the query to produce a result comprises:

negotiating clustering properties between the producer and the consumer; and

processing the query based on the negotiated clustering properties.

23. The non-transitory computer readable device of claim 16 , wherein processing the query to produce a result comprises:

allowing the TPF to dynamically support parallelism or distributed processing when processing the query.

24. A system, comprising:

a database, configured to provide table parameterized function (TPF) functionality and having defined therein a TPF, wherein the definition of the TPF defines one or more parameters of the TPF, at least one of the parameters being a table parameter;

a processor configured to:

receive a query that operates to call the TPF to process information from a producer, wherein the query defines one or more input parameters, the input parameters comprising at least one table input parameter to be used as input for calling the TPF, wherein the table parameter comprises a set of rows from a table of the database,

process the query to produce a result, wherein the processing comprises executing two or more rows of the table input parameter in parallel,

mark data of the table indicated by the table input parameter that is not to be provided to a consumer as unavailable without deleting the data from a memory structure, wherein the marking of the data of the memory structure consumes fewer processing resources compared to removing the data of the table that is not to be provided from the memory structure; and

return access to the memory structure as the result of the query, wherein the memory structure includes at least a portion of the data that has been marked as being unavailable.

25. The system of claim 24 , wherein the processor s further configured to rewind the result to allow the result to be read multiple times.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 6, 2013
From: SAP AG
To: SYBASE, INC.
Reel/Frame 031172/0989 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 1, 2013
From: DELFRANIER, MARK; PLAGER, JEFFREY J.; SHARIQUE, MUHAMMED; SHARMA, VIPUL; BOWMAN, IVAN T.; NICA, ANISOARA; GOEL, ANIL K.; KIRK, STEVEN A.
To: SAP AG
Reel/Frame 030324/0089 →
Continuity (2)
Provisional Application 61564134 · Nov 28, 2011
Related Publication 20130138626A1 · May 30, 2013
Cited By (1)
US 12,248,476