Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I read from web resources that you can use "where exists" to do an optimized load
I have tried a simple example below but it does not perform what is expected
Can anyone point out what's wrong with it? Thanks
//tmp:
//load * Inline [
// id, flag
// 1, 1
// 2, 1
// 3, 1
// 4, 0
// 5, 0
// 6, 1
// 7, 0
// 8, 1
// 9, 0
// 10, 1
//];
//
//STORE tmp into tmp.QVD;
//DROP Table tmp;
flag:
LOAD
1 as flag
AutoGenerate 1;
tmp:
load
id
From tmp.QVD(qvd)
where exists (flag,flag);
DROP Table flag;
Jerry Lau wrote:
Hi all,
I read from web resources that you can use "where exists" to do an optimized load
I have tried a simple example below but it does not perform what is expected
Can anyone point out what's wrong with it? Thanks
tmp:
load
id
From tmp.QVD(qvd)
where exists (flag,flag);
DROP Table flag;
Hello Jerry,
When I take this script segment and add the field [flag] to the statement involving exists(), I get a restoration of the optimized load message. try:
tmp:
load id, flag
From tmp.QVD(qvd)
where exists (flag, flag)
Jerry Lau wrote:
Hi all,
I read from web resources that you can use "where exists" to do an optimized load
I have tried a simple example below but it does not perform what is expected
Can anyone point out what's wrong with it? Thanks
tmp:
load
id
From tmp.QVD(qvd)
where exists (flag,flag);
DROP Table flag;
Hello Jerry,
When I take this script segment and add the field [flag] to the statement involving exists(), I get a restoration of the optimized load message. try:
tmp:
load id, flag
From tmp.QVD(qvd)
where exists (flag, flag)
Hi Evan
Thanks that works
But so does that mean the field to be used for controlling optimized load must be loaded to the data?
Hello Jerry,
It looks that way, at least at the time the load statement is being performed. However you can drop the EXISTS field from any tables after the import is done.
DROP field flag from tmp;