You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Norris Lee <no...@simba.com> on 2014/10/24 01:42:15 UTC
Query optimization and obtaining metadata
Hi,
I have a question about getting column metadata in the most efficient manner.
Is it more efficient to use LIMIT 1 or WHERE 0=1? Or is there an even better way?
Does Drill prune the query out completely if it recognizes a false predicate?
Thanks,
Norris
Re: Query optimization and obtaining metadata
Posted by Bob Rumsby <br...@maprtech.com>.
There is a DESCRIBE command, which is covered in the Drill Tutorial.
Bob
On Thu, Oct 23, 2014 at 4:42 PM, Norris Lee <no...@simba.com> wrote:
> Hi,
>
> I have a question about getting column metadata in the most efficient
> manner.
>
> Is it more efficient to use LIMIT 1 or WHERE 0=1? Or is there an even
> better way?
> Does Drill prune the query out completely if it recognizes a false
> predicate?
>
> Thanks,
> Norris
>
Re: Query optimization and obtaining metadata
Posted by Jacques Nadeau <ja...@apache.org>.
For tables that don't return metadata with describe, limit 0 is fastest.
We haven't yet implemented a check yet for a false expression.
On Thu, Oct 23, 2014 at 4:42 PM, Norris Lee <no...@simba.com> wrote:
> Hi,
>
> I have a question about getting column metadata in the most efficient
> manner.
>
> Is it more efficient to use LIMIT 1 or WHERE 0=1? Or is there an even
> better way?
> Does Drill prune the query out completely if it recognizes a false
> predicate?
>
> Thanks,
> Norris
>