phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerber, Bryan W" <Bryan.Ger...@pnnl.gov>
Subject RE: EXPLAIN has similar output for filters on indexed and non-indexed column
Date Wed, 01 Jul 2015 18:18:07 GMT
Phoenix doesn’t support automatically using index on a non-covered query. Check out https://phoenix.apache.org/secondary_indexing.html
for some examples. Your query may have been faster due to more data being cached.

The 2-step plan you’re looking for in this case looks more like this one where I used a
hint to specify the index:
| CLIENT 40-CHUNK PARALLEL 40-WAY FULL SCAN OVER LOG |
|     SKIP-SCAN-JOIN TABLE 0               |
|         CLIENT 40-CHUNK PARALLEL 40-WAY FULL SCAN OVER LOG_REQUEST_IDX |
|             SERVER FILTER BY FIRST KEY ONLY AND "RQ" LIKE '/jquery%' |
|     DYNAMIC SERVER FILTER BY ("LOG.TS", "LOG.F", "LOG.R") IN (($707.$709, $707.$710, $707.$711))
|


From: Martin Pernollet [mailto:mpernollet@octo.com]
Sent: Wednesday, July 01, 2015 6:06 AM
To: user@phoenix.apache.org
Subject: EXPLAIN has similar output for filters on indexed and non indexed column

Hi,

I want to perform :
SELECT * FROM "table" where "family"."column1" = 'value'

Running an EXPLAIN on this request before creating an index on a column gives :

CLIENT PARALLEL 1-WAY FULL SCAN OVER table
  SERVER FILTER BY family.column1 = 'value'

Looks OK.
Then I simply :
CREATE INDEX "table_IDX_column1" on "table" ("family"."column1");

Following requests using a filter on indexed column are definitely faster.

However, when running EXPLAIN again I have exactly the same output mentioning a full scan.

I am not familiar with Phoenix explain plan, but I would expect 1 GET on the index table,
and then 1 get in my main table. Isn't it?
Mime
View raw message