RFC for select from index.#2046
Conversation
a48f4db to
0dd0090
Compare
[ci skip]
0dd0090 to
d75d68d
Compare
There was a problem hiding this comment.
strikes me as a bit awkward that with that notation, you have to guess whether a.b is table.index or database.table.
There was a problem hiding this comment.
Yeah, I think it might be wiser to use syntax like table@index or table:index.
|
Existing databases have syntax for specifying an index hint, and existing ORMs have support for sending these hints with various syntaxes (http://docs.sqlalchemy.org/en/rel_1_0/core/selectable.html#sqlalchemy.sql.expression.Select.with_hint). It doesn't look like any of these modify the table expression, so it might be more accessible to use a separate clause instead of encoding this in the table name. |
|
@bdarnell I'm aware of the index hints syntax. This is a bit more forceful than that. It's a bit strange to me how SQL goes out of its way to make indexes completely optional and yet if they are not set up or used correctly your application may not run because of horrific performance. I think @tschottdorf's suggestion of requiring an index for specific parts of the where-clause is interesting (though I'd adjust the syntax somewhat). |
There was a problem hiding this comment.
Something really doesn't make sense in this sentence.
|
LGTM. Does our former employer's SQL use anything similar? |
|
LGTM, with the |
Using `:` leads to shift/reduce conflicts. Address feedback.
|
LGTM |
RFC for select from index.
Added support for "SELECT * FROM table@index". This is an extension which allows us to more explicitly test our index scanning. The index must exist within the table and the only columns accessible are those the index is defined on. See #2046.
No description provided.