On Wed, Sep 10, 2025 at 6:20 PM Justin <[email protected]> wrote:

> On Wed, Sep 10, 2025 at 5:28 PM Nico Williams <[email protected]>
> wrote:
>
>>  [snip]

> I would really like out-of-band hints.  These would be hints not
>> specified in the SQL itself but to be sent separately and which address
>> table sources or joins by name, like this:
>>
>> psql> SELECT .. FROM x x1 JOIN y y1 ON .. JOIN y y2 ON .. WHERE ..;
>> ...> \hint y1 indexed by ..
>> ...> \hint y2 indexed by ..
>> ...> ;
>>
>
> I humbly disagree, the point of SQL being a 4th  generation language is,
> I tell it what I want, not how to go get what I want.
>

And the point of high-level languages is to eliminate GOTO, and yet GOTO
still exists.

The real problem is requiring the application to carry the hints.

My old RDBMS let you CREATE HINT to which you (the DBA) would put a SELECT,
UPDATE or DELETE statement (similar to PREPARE), and what indices to use.
That way, the application doesn't carry them, and "you" can update them as
needed.

Rarely useful, but occasionally *VERY* useful.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

Reply via email to