Thanks James.
So, if I did a range lookup like - EXPLAIN SELECT ID FROM EXP WHERE ID > 5 AND
ID < 10 then I get .... RANGE SCAN OVER EXP [6] - [10]
Is that indication enough that PK/ index is used?
From: James Heather <[email protected]>
To: [email protected]
Sent: Wednesday, September 30, 2015 7:49 PM
Subject: Re: Explain plan over primary key column
You're asking for every single row of the table, so nothing's going to avoid a
full scan. The index wouldn't help.
On 30/09/15 15:18, Sumit Nigam wrote:
Hi,
I have a table as:
CREATE TABLE EXP (ID BIGINT NOT NULL PRIMARY KEY, TEXT VARCHAR);
If I explain the select:
EXPLAIN SELECT ID FROM EXP;
Then it shows CLIENT 1-CHUNK PARALLEL 1-WAY FULL SCAN OVER EXP ....
I assume it still uses rowkey. Or is it should have shown using rowkey in
explain plan?
Also, is it a good idea to declare VARCHAR(n) vs plain VARCHAR? Does it save
some space?
Thanks, Sumit