From b1f2c4e70d7749031242fdb68c7488c69e3660ed Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 1 Jun 2021 06:17:46 +0000 Subject: [PATCH] gain 1000x performance with one weird trick --- copyparty/u2idx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/copyparty/u2idx.py b/copyparty/u2idx.py index cad90c1a..70ebcaea 100644 --- a/copyparty/u2idx.py +++ b/copyparty/u2idx.py @@ -126,10 +126,11 @@ class U2idx(object): joins += "inner join mt mt{} on {} = {} ".format( mt_ctr, mt_keycmp, mt_keycmp2 ) + mt_keycmp = mt_keycmp2 if v == "tags": v = "mt{0}.v".format(mt_ctr) else: - v = "mt{0}.k = '{1}' and mt{0}.v".format(mt_ctr, v) + v = "+mt{0}.k = '{1}' and mt{0}.v".format(mt_ctr, v) else: raise Pebkac(400, "invalid key [" + v + "]")