-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(kf): query composed contracts more efficiently #295
Conversation
d725ee6
to
6ab3a57
Compare
tagging @brennanjl, you may want to take a look at |
@outerlook |
Just to confirm, using |
Ah never mind, I have found the source of the bug. Thank you for flagging. |
@brennanjl. Yes, it is. Also which one is considered best practice between those two? I see no difference |
In general, if you can do it in SQL, you should. It will virtually always be more efficient. Therefore, I'd say the one without The bug stems from the fact that postgres returns a |
FYI, a fix is up here: kwilteam/kwil-db#790. You will need to typecast your |
Alright, thanks for the note. 👍 converted to the draft:
|
@MicBun it just got merged |
Alright, thanks! |
Description
Applying the suggestion from Brennan to make the query more efficient despite current kwil limitation.
Notes:
The original suggestion is modified:
into:
It will cause errors. It looks like there is a bug on
return select ... group
, since the for statements worksRelated Problem
resolves: #291
How Has This Been Tested?
0000000000000000000000000000000000000000000000000000000000000001
get records with taxonomy
on composed_stream_contract_test.md file