IP Library Granted Patent US 12,711,143
Granted Patent B2
US 12,711,143 · App. 18/926,054 · Granted Aug 18, 2026

Query generation with ranking recommendation

Inventors: Mahender Allam (Ghanpur, IN); Furkan Mohd Nisar (Uttar Pradesh, IN); Vivek Bhargava (Bangalore, IN); Dinesh Koppada (Bangalore, IN)
Assignee: Dell Products L.P.
G06F16/248G06F16/24522G06F16/24553
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 12,711,143
App. No.
18/926,054
Granted
Aug 18, 2026
Kind
B2
Abstract

A method for generating ranked queries includes receiving a structured query language (SQL) input, identifying a target database based on the SQL input, identifying an optimization ruleset based on the target database, generating a set of potential queries by using the SQL input and the optimization ruleset as an input to a natural language processor, generating a set of rankings, where each ranking is associated with one of the set of potential queries, causing to display, on a graphical user interface of a query device interface, each query of the set of potential queries based on the set of rankings, receiving a user input from the query device interface, and performing an action from an action set based on the user input.

Claims (49)

1 . A method for generating ranked queries, the method comprising:

receiving a structured query language (SQL) input;

identifying a target database based on the SQL input;

identifying an optimization ruleset based on the target database;

generating a set of potential queries by using the SQL input and the optimization ruleset as an input to a natural language processor, wherein the natural language processor performs a partial execution of each potential query of the set of potential queries to generate the set of potential queries;

generating a set of rankings, wherein each ranking is associated with one of the set of potential queries, wherein generating the set of rankings is based on a set of criteria comprising execution time, resource usage, and adherence to the optimization ruleset, and generating the set of rankings comprises:

determining a weight for each of the set of criteria;

determining a score for each of the set of criteria for each of the query of the set of potential queries to obtain a score set;

applying the weight for each of the set of criteria to each associated score; and

normalizing the score set;

causing to display, on a graphical user interface of a query device interface, each query of the set of potential queries based on the set of rankings;

receiving a user input from the query device interface; and

performing an action from an action set based on the user input.

2 . The method of claim 1 , wherein the SQL input is received from a natural language to SQL generator.

3 . The method of claim 1 , wherein the optimization ruleset is generated based on a combination of user inputs and metadata associated with the target database.

4 . The method of claim 3 , wherein the optimization ruleset comprises index utilization, avoid “SELECT”, join optimization, subquery optimization, aggregate functions, avoid cursors, where clause, avoid “ORDER BY” in subqueries, avoid function in “WHERE” clause, or table partitioning.

5 . The method of claim 1 , wherein the action set comprises executing a query of the set of potential queries on the target database, reevaluating the set of rankings, and generating a new potential set of queries.

6 . A non-transitory computer readable medium (CRM) comprising computer readable program code, which when executed by a computer processor, enables the computer to perform a method for generating ranked queries, the method comprising:

receiving a structured query language (SQL) input;

identifying a target database based on the SQL input;

identifying an optimization ruleset based on the target database;

generating a set of potential queries by using the SQL input and the optimization ruleset as an input to a natural language processor, wherein the natural language processor performs a partial execution of each potential query of the set of potential queries to generate the set of potential queries;

generating a set of rankings, wherein each ranking is associated with one of the set of potential queries, wherein generating the set of rankings is based on a set of criteria comprising execution time, resource usage, and adherence to the optimization ruleset, and generating the set of rankings comprises:

determining a weight for each of the set of criteria;

determining a score for each of the set of criteria for each of the query of the set of potential queries to obtain a score set;

applying the weight for each of the set of criteria to each associated score; and

normalizing the score set;

causing to display, on a graphical user interface of a query device interface, each query of the set of potential queries based on the set of rankings;

receiving a user input from the query device interface; and

performing an action from an action set based on the user input.

7 . The non-transitory CRM of claim 6 , wherein the SQL input is received from a natural language to SQL generator.

8 . The non-transitory CRM of claim 6 , wherein the optimization ruleset is generated based on a combination of user inputs and metadata associated with the target database.

9 . The non-transitory CRM of claim 8 , wherein the optimization ruleset comprises index utilization, avoid “SELECT”, join optimization, subquery optimization, aggregate functions, avoid cursors, where clause, avoid “ORDER BY” in subqueries, avoid function in “WHERE” clause, or table partitioning.

10 . The non-transitory CRM of claim 6 , wherein the action set comprises executing a query of the set of potential queries on the target database, reevaluating the set of rankings, and generating a new potential set of queries.

11 . A method for generating ranked queries, the method comprising:

receiving a structured query language (SQL) input;

identifying a target database based on the SQL input;

identifying an optimization ruleset based on the target database;

generating a set of potential queries by using the SQL input and the optimization ruleset as an input to a natural language processor, wherein the natural language processor performs a partial execution of each potential query of the set of potential queries to generate the set of potential queries;

generating, based on a set of criteria, a set of rankings, wherein each ranking is associated with one of the set of potential queries, wherein generating the set of rankings comprises:

determining a weight for each of the set of criteria, wherein the set of criteria comprises execution time, resource usage, and adherence to the optimization ruleset;

determining a score for each query of the set of potential queries to obtain a score set; and

normalizing the score set;

causing to display, on a graphical user interface of a query device interface, each query of the set of potential queries based on the set of rankings;

receiving a user input from the query device interface; and

performing an action from an action set based on the user input.

12 . The method of claim 11 , wherein the SQL input is received from a natural language to SQL generator.

13 . The method of claim 11 , wherein the optimization ruleset is generated based on a combination of user inputs and metadata associated with the target database.

14 . The method of claim 13 , wherein the optimization ruleset comprises index utilization, avoid “SELECT”, join optimization, subquery optimization, aggregate functions, avoid cursors, where clause, avoid “ORDER BY” in subqueries, avoid function in “WHERE” clause, or table partitioning.