IP Library Granted Patent US 7,457,795
Granted Patent B1
US 7,457,795 · App. 10/761,029 · Granted Nov 25, 2008

Method and system for transforming multiple alternative equality conditions

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 7,457,795
App. No.
10/761,029
Granted
Nov 25, 2008
Kind
B1
Abstract

A method, computer program, and computer network are disclosed for transforming multiple alternative equality conditions between a database column and a set of values. The method includes identifying one or more groups of consecutive values in the set. The equality conditions corresponding to values found in one or more of the identified groups are removed. One or more inequality conditions corresponding to the one or more of the identified groups are added.

Claims (65)

1. A method comprising:

identifying multiple alternative equality conditions between a database column and a set of values in a query;

identifying a group of consecutive values in the set;

removing equality conditions corresponding to the values in the identified group;

removing the values in the identified group from the set;

adding a range of values corresponding to the values in the identified group to the set;

adding an inequality condition between the database column and the least member of the range of values; and

adding an inequality condition between the database column and the greatest member of the range of values.

2. The method of claim 1 further comprising the step of:

checking whether the database column is a non-indexed column.

3. The method of claim 1 further comprising the step of:

checking whether the set of values includes only literal discrete values.

4. The method of claim 1 further comprising the step of:

checking whether the set contains more values than a specified lower limit.

5. The method of claim 1 where identifying the group of consecutive values in the set comprises identifying a group with the largest numbers of consecutive values.

6. The method of claim 1 where removing equality conditions corresponding to the values in the the identified group comprises creating a group of equality conditions that does not include equality conditions corresponding to those values.

7. The method of claim 1 where:

the inequality condition between the database column and the least member of the range of values is a greater than or equal to condition; and

the inequality condition between the database column and the greatest member of the range of values is a less than or equal to condition.

8. The method of claim 1 where identifying the group of consecutive values in the set comprises identifying a group of at least three consecutive values in the set.

9. A computer program, stored on a tangible storage, the program comprising executable instructions that cause a computer to:

identify multiple alternative equality conditions between a database column and a set of values in a query;

identify a group of consecutive values in the set;

remove equality conditions corresponding to the values in the identified group;

remove the values in the identified group from the set;

add a range of values corresponding to the values in the identified group to the set;

add an inequality condition between the database column and the least member of the range of values; and

add an inequality condition between the database column and the greatest member of the range of values.

10. The computer program of claim 9 further comprising executable instructions that cause the computer to:

check whether the database column is a non-indexed column.

11. The computer program of claim 9 further comprising executable instructions that cause the computer to:

check whether the set of values includes only literal discrete values.

12. The computer program of claim 9 further comprising executable instructions that cause the computer to:

check whether the set contains more values than a specified lower limit.

13. The computer program of claim 9 where the computer identifies the group of consecutive values in the set by identifying a group with the largest numbers of consecutive values.

14. The computer program of claim 9 where the computer removes equality conditions corresponding to the values in the the identified group by creating a group of equality conditions that does not include equality conditions corresponding to those values.

15. The computer program of claim 9 where:

the inequality condition between the database column and the least member of the range of values is a greater than or equal to condition; and

the inequality condition between the database column and the least member of the range of values is a greater than or equal to condition.

16. The computer program of claim 9 where the computer identifies the group of consecutive values in the set by identifying a group of at least three consecutive values in the set.

17. A database system comprising:

one or more nodes;

a plurality of CPUs, each of the one or more nodes providing access to one or more CPUs;

a plurality of virtual processes, each of the one or more CPUs providing access to one or more virtual processes;

each virtual process configured to manage data, including rows organized in tables, stored in one of a plurality of data-storage facilities; and

an optimizer configured to:

identify multiple alternative equality conditions between a database column and a set of values in a query;

identify a group of consecutive values in the set;

remove equality conditions corresponding to the values in the identified group;

remove the values in the identified group from the set;

add a range of values corresponding to the values in the identified group to the set;

an inequality condition between the database column and the least member of the range of values; and

add an inequality condition between the database column and the greatest member of the range of values.

18. The database system of claim 17 where the optimizer is further configured to:

check whether the database column is a non-indexed column.

19. The database system of claim 17 where the optimizer is further configured to:

check whether the set of values includes only literal discrete values.

20. The database system of claim 17 where the optimizer is further configured to:

check whether the set contains more values than a specified lower limit.

21. The database system of claim 17 where the optimizer identifies the group of consecutive values in the set by identifying a group with the largest numbers of consecutive values.

22. The database system of claim 17 where the optimizer removes equality conditions corresponding to the values in the the identified group by creating a group of equality conditions that does not include equality conditions corresponding to those values.

23. The database system of claim 17 where:

the inequality condition between the database column and the least member of the range of values is a greater than or equal to condition; and

the inequality condition between the database column and the least member of the range of values is a greater than or equal to condition.

24. The database system of claim 17 where the optimizer identifies the group of consecutive values in the set by identifying a group of at least three consecutive values in the set.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 18, 2008
From: NCR CORPORATION
To: TERADATA US, INC.
Reel/Frame 020666/0438 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 19, 2004
From: SHELDON, STEPHEN FIFE; LOPES, ARTHUR VARGAS
To: NCR CORPORATION
Reel/Frame 014914/0528 →