|
楼主 |
发表于 2017-5-22 11:24:13
|
显示全部楼层
本帖最后由 wgs7909 于 2017-5-22 14:10 编辑
justep把KSQL转换成SQL后是这样的:- SELECT
- ROWNUM AS JUSTEP_RN__,
- JUSTEP_TABLE__.*
- FROM
- (
- SELECT
- UDV_X5_INPRO_BYORG.BWSL AS BWSL,
- UDV_X5_INPRO_BYORG.CALCAMOUNT AS CALCAMOUNT,
- UDV_X5_INPRO_BYORG.CAR_BAR_CODE AS CAR_BAR_CODE,
- UDV_X5_INPRO_BYORG.CAR_NUM AS CAR_NUM,
- UDV_X5_INPRO_BYORG.CHARGE_FEE AS CHARGE_FEE,
- UDV_X5_INPRO_BYORG.CHARGE_PERSON AS CHARGE_PERSON,
- UDV_X5_INPRO_BYORG.CHARGE_TIME AS CHARGE_TIME,
- UDV_X5_INPRO_BYORG.CHARGE_WEIGHT AS CHARGE_WEIGHT,
- UDV_X5_INPRO_BYORG.CLIENTSHORTNAME AS CLIENTSHORTNAME,
- UDV_X5_INPRO_BYORG.CMIL AS CMIL,
- UDV_X5_INPRO_BYORG.CUSTOMER_NICKNAME AS CUSTOMER_NICKNAME,
- UDV_X5_INPRO_BYORG.DATE_BELONG AS DATE_BELONG,
- UDV_X5_INPRO_BYORG.DATE_TALLY AS DATE_TALLY,
- UDV_X5_INPRO_BYORG.DEDUCT_WEIGHT AS DEDUCT_WEIGHT,
- UDV_X5_INPRO_BYORG.DESTINATION_NAME AS DESTINATION_NAME,
- UDV_X5_INPRO_BYORG.DISCHANGE_AMOUNT AS DISCHANGE_AMOUNT,
- UDV_X5_INPRO_BYORG.DJ AS DJ,
- UDV_X5_INPRO_BYORG.FWEIGHT AS FWEIGHT,
- UDV_X5_INPRO_BYORG.GOODS_NAME AS GOODS_NAME,
- UDV_X5_INPRO_BYORG.IDENTITYCARDADDRESS AS IDENTITYCARDADDRESS,
- UDV_X5_INPRO_BYORG.IDENTITYCARD_NO AS IDENTITYCARD_NO,
- UDV_X5_INPRO_BYORG.INSPECT_TIME AS INSPECT_TIME,
- UDV_X5_INPRO_BYORG.IS_SPLIT AS IS_SPLIT,
- UDV_X5_INPRO_BYORG.ORDER_INFO AS ORDER_INFO,
- UDV_X5_INPRO_BYORG.ORDER_PRICE AS ORDER_PRICE,
- UDV_X5_INPRO_BYORG.ORDER_TYPE AS ORDER_TYPE,
- UDV_X5_INPRO_BYORG.OTHER_WEIGHT AS OTHER_WEIGHT,
- UDV_X5_INPRO_BYORG.PERSON_PURCHASE AS PERSON_PURCHASE,
- UDV_X5_INPRO_BYORG.PERSON_RELEASE AS PERSON_RELEASE,
- UDV_X5_INPRO_BYORG.PRICE AS PRICE,
- UDV_X5_INPRO_BYORG.PURCHASE_CUSTOMERUSER_NAME AS PURCHASE_CUSTOMERUSER_NAME,
- UDV_X5_INPRO_BYORG.PURCHASE_MARK AS PURCHASE_MARK,
- UDV_X5_INPRO_BYORG.RZ AS RZ,
- UDV_X5_INPRO_BYORG.SF AS SF,
- UDV_X5_INPRO_BYORG.SML AS SML,
- UDV_X5_INPRO_BYORG.SNAME AS SNAME,
- UDV_X5_INPRO_BYORG.STATEE AS STATEE,
- UDV_X5_INPRO_BYORG.SUM_DECODE_WEIGHT AS SUM_DECODE_WEIGHT,
- UDV_X5_INPRO_BYORG.SWEIGHT AS SWEIGHT,
- UDV_X5_INPRO_BYORG.SZQW AS SZQW,
- UDV_X5_INPRO_BYORG.TIME_OPERATE_G AS TIME_OPERATE_G,
- UDV_X5_INPRO_BYORG.TIME_OPERATE_T AS TIME_OPERATE_T,
- UDV_X5_INPRO_BYORG.TIME_RELEASE AS TIME_RELEASE,
- UDV_X5_INPRO_BYORG.TO_TYPE AS TO_TYPE,
- UDV_X5_INPRO_BYORG.TWEIGHT AS TWEIGHT,
- UDV_X5_INPRO_BYORG.fID,
- UDV_X5_INPRO_BYORG.WATER_WEIGHT AS WATER_WEIGHT,
- UDV_X5_INPRO_BYORG.YARD_POSITION_NAME AS YARD_POSITION_NAME,
- UDV_X5_INPRO_BYORG.YDZS AS YDZS,
- UDV_X5_INPRO_BYORG.ZAZHI_WEIGHT AS ZAZHI_WEIGHT,
- UDV_X5_INPRO_BYORG.ZZ AS ZZ
- FROM
- UDV_X5_INPRO_BYORG UDV_X5_INPRO_BYORG
- WHERE
- UDV_X5_INPRO_BYORG.SFNAME LIKE '%/中粮贸易%'
- ORDER BY
- TIME_OPERATE_T DESC,
- CHARGE_TIME DESC
- ) JUSTEP_TABLE__
- WHERE
- ROWNUM < 21
复制代码 就是这个SQL慢啊,
KSQL里可以看到 limit 可是不起作用啊????
SQL里也可以看到 ROWNUM<21,还是慢,但是我把SQL放在工具里,就很快了。
这是为什么呢?
|
-
|