ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@apache.org>
Subject Re: EXPLAIN for DML statements
Date Tue, 27 Dec 2016 20:00:22 GMT
Alexander,

If they do this at the moment

>  If they issue "explain
> update...", there's no problem to return output for EXPLAIN SELECT
> without requiring anything else from the user.


then they will get an exception.

My question was what are the efforts to support this?

—
Denis

> On Dec 26, 2016, at 2:05 AM, Alexander Paschenko <alexander.a.paschenko@gmail.com>
wrote:
> 
> Users won't need to create that query. If they issue "explain
> update...", there's no problem to return output for EXPLAIN SELECT
> without requiring anything else from the user.
> 
> From EXPLAIN, the user usually expects to find out which indexes will
> be used by their query. And that's what EXPLAIN for SELECT gives.
> 
> - Alex
> 
> 2016-12-23 21:36 GMT+03:00 Denis Magda <dmagda@apache.org>:
>> This might be a tricky part for the users because they need to recreate the query
manually
>> 
>>> UPDATE Person SET name = 'John' WHERE surname = 'Smith',
>>> 
>>> then we could show
>>> 
>>> EXPLAIN SELECT _key from Person WHERE surname = 'Smith’;
>> 
>> How difficult is to support EXPLAIN for DML in general? Let’s discuss the challenges
and implementation details and create a ticket after that.
>> 
>> —
>> Denis
>> 
>> 
>>> On Dec 23, 2016, at 7:46 AM, Alexander Paschenko <alexander.a.paschenko@gmail.com>
wrote:
>>> 
>>> Denis,
>>> 
>>> Currently there's no API to get those queries. However, they are
>>> always generated under the hood - except for 'fast' UPDATE and DELETE
>>> that don't need any queries.
>>> So what is suggested in docs is to EXPLAIN those SELECTs - say, if we
>>> have DML statement
>>> 
>>> UPDATE Person SET name = 'John' WHERE surname = 'Smith',
>>> 
>>> then we could show
>>> 
>>> EXPLAIN SELECT _key from Person WHERE surname = 'Smith';
>>> 
>>> - Alex
>>> 
>>> 2016-12-23 3:09 GMT+03:00 Denis Magda <dmagda@apache.org>:
>>>> Alex P., Sergi,
>>>> 
>>>> All we know that EXPLAIN is not supported for DML statements at the moment.
>>>> http://apacheignite.gridgain.org/docs/dml#section-explain-support-for-dml-statements
>>>> 
>>>> However, I can’t get how I can get over this limitation for UPDATE and
>>>> DELETE statements following this recommendation
>>>> 
>>>> "One possible approach is to execute EXPLAIN for the SELECT automatically
>>>> generated (UPDATE, DELETE) or used (INSERT, MERGE) by DML statements. This
>>>> will give an insight on the indexes that are used while a DML operation is
>>>> executed.”
>>>> 
>>>> How can I get SELECT queries that are generated by these DML operations
>>>> automatically?
>>>> 
>>>> —
>>>> Denis
>> 


Mime
View raw message