当前位置: 首页 > news >正文

制作企业网站软件html网页制作用什么软件

制作企业网站软件,html网页制作用什么软件,网站建设的过程包括几个阶段,创办网站要多少钱如题 效率慢疑惑 效率慢 分页查询,发现效率很慢,然后发现是比较复杂的sql,CountJSqlParser45它不会帮忙优化掉,就是select多少字段它count的时候也还是这么多字段 框架里的用法是这样的 所以去看了CountJSqlParser45里面的代码,发现如果有group之类的,它就不帮忙把count优化…

如题

  • 效率慢
  • 疑惑

效率慢

分页查询,发现效率很慢,然后发现是比较复杂的sql,CountJSqlParser45它不会帮忙优化掉,就是select多少字段它count的时候也还是这么多字段
框架里的用法是这样的
在这里插入图片描述

所以去看了CountJSqlParser45里面的代码,发现如果有group之类的,它就不帮忙把count优化一下,直接在外面套了一层count(0)

知道问题之后就是覆盖这个方法,所以在自己的下面新建了一个同路径同名的覆盖它
在这里插入图片描述
原来的代码是发现不是简单sql就直接不处理了,现在的逻辑是发现是PlainSelect但是不是isSimpleCount的情况下,把查询里面的select的普通字段都去除掉,新写了cleanSimpleField这个方法
在这里插入图片描述

逻辑很简单,如果是比较复杂的字段还留着,因为可能会影响结果,比如函数啊别名啊之类的,但是如果只是简单的字段都去掉,如果发现都是简单字段,那么直接用1来代替

    public List<SelectItem> cleanSimpleField(PlainSelect select){//因为查询太多的话会导致速度很慢,所以移除掉普通的字段,把肯能影响结果的字段留下来List<SelectItem> newSelectItems =new ArrayList<>();//遍历原来的select 然后把需要的留下for (SelectItem item : select.getSelectItems()) {//select列中包含参数的时候不可以去掉,否则会引起参数个数错误if (item.toString().contains("?")) {newSelectItems.add(item);}//如果查询列中包含函数,也不可以,函数可能会聚合列if (item instanceof SelectExpressionItem) {Expression expression = ((SelectExpressionItem) item).getExpression();if (expression instanceof Function) {String name = ((Function) expression).getName();if (name != null) {String NAME = name.toUpperCase();if (skipFunctions.contains(NAME)) {//go on} else if (falseFunctions.contains(NAME)) {newSelectItems.add(item);} else {for (String aggregateFunction : AGGREGATE_FUNCTIONS) {if (NAME.startsWith(aggregateFunction)) {falseFunctions.add(NAME);newSelectItems.add(item);}}skipFunctions.add(NAME);}}} else if (expression instanceof Parenthesis && ((SelectExpressionItem) item).getAlias() != null) {//#555,当存在 (a+b) as c 时,c 如果出现了 order by 或者 having 中时,会找不到对应的列,// 这里想要更智能,需要在整个SQL中查找别名出现的位置,暂时不考虑,直接排除newSelectItems.add(item);}}}//都是简单的都被去掉了,那么就把原来的第一个拿来if (ObjectUtil.isEmpty(newSelectItems)){newSelectItems.add(new SelectExpressionItem(new Column("1")));}return newSelectItems;}

疑惑

照理说LocalMySqlDialect里面改成自己的新的类,不是CountJSqlParser45应该也行的,但是不知道为什么我把CountJSqlParser45改成自己新写的类不行,所以只能用覆盖的方式了

this.countSqlParser = ClassUtil.newInstance(properties.getProperty("countSqlParser"), CountSqlParser.class, properties, CountJSqlParser45::new);
//改成下面这个不知道为什么不行
```c
this.countSqlParser = ClassUtil.newInstance(properties.getProperty("countSqlParser"), CountSqlParser.class, properties, MyCountJSqlParser45::new);


文章转载自:
http://dinncoafflictive.bkqw.cn
http://dinncorillet.bkqw.cn
http://dinncorelentless.bkqw.cn
http://dinncoacmesthesia.bkqw.cn
http://dinncohdf.bkqw.cn
http://dinncoshekel.bkqw.cn
http://dinncocaravaggiesque.bkqw.cn
http://dinncoarpa.bkqw.cn
http://dinncochauvinist.bkqw.cn
http://dinncovr.bkqw.cn
http://dinncooverlive.bkqw.cn
http://dinncolophobranch.bkqw.cn
http://dinncodespond.bkqw.cn
http://dinncoairfare.bkqw.cn
http://dinncosubtility.bkqw.cn
http://dinncoprojecting.bkqw.cn
http://dinncogrindingly.bkqw.cn
http://dinncoinertialess.bkqw.cn
http://dinncohatful.bkqw.cn
http://dinncobetsy.bkqw.cn
http://dinncoholographic.bkqw.cn
http://dinnconeve.bkqw.cn
http://dinncoexoderm.bkqw.cn
http://dinncoglyoxaline.bkqw.cn
http://dinncoyarraman.bkqw.cn
http://dinncodimidiate.bkqw.cn
http://dinncomidian.bkqw.cn
http://dinncolatinian.bkqw.cn
http://dinncomimical.bkqw.cn
http://dinncodormient.bkqw.cn
http://dinncosahaptan.bkqw.cn
http://dinncononcollegiate.bkqw.cn
http://dinncoilo.bkqw.cn
http://dinncofleetly.bkqw.cn
http://dinncodemultiplexer.bkqw.cn
http://dinncovpd.bkqw.cn
http://dinncothroughput.bkqw.cn
http://dinnconerol.bkqw.cn
http://dinncoretractable.bkqw.cn
http://dinncoindeterminist.bkqw.cn
http://dinncohype.bkqw.cn
http://dinncotineid.bkqw.cn
http://dinncobeefeater.bkqw.cn
http://dinncosoftball.bkqw.cn
http://dinncopa.bkqw.cn
http://dinncofund.bkqw.cn
http://dinncodisastrous.bkqw.cn
http://dinncoclerkship.bkqw.cn
http://dinncoapplecart.bkqw.cn
http://dinncoraises.bkqw.cn
http://dinncorigamarole.bkqw.cn
http://dinncodicty.bkqw.cn
http://dinncojustificatory.bkqw.cn
http://dinncospectrograph.bkqw.cn
http://dinncozengakuren.bkqw.cn
http://dinncoumbilicular.bkqw.cn
http://dinncomiltonic.bkqw.cn
http://dinncologged.bkqw.cn
http://dinncodecipher.bkqw.cn
http://dinncowhiteness.bkqw.cn
http://dinnconocuousness.bkqw.cn
http://dinncogeorge.bkqw.cn
http://dinncosepiolite.bkqw.cn
http://dinncoharquebuss.bkqw.cn
http://dinncosynapomorphy.bkqw.cn
http://dinncounderprop.bkqw.cn
http://dinncoparakeet.bkqw.cn
http://dinncohapteron.bkqw.cn
http://dinncoexdividend.bkqw.cn
http://dinncounchurched.bkqw.cn
http://dinncochafer.bkqw.cn
http://dinncosepulture.bkqw.cn
http://dinncostridulate.bkqw.cn
http://dinncospeedwriting.bkqw.cn
http://dinncooutride.bkqw.cn
http://dinncoauxesis.bkqw.cn
http://dinncomerger.bkqw.cn
http://dinncoenglishness.bkqw.cn
http://dinncoaddenda.bkqw.cn
http://dinncoarctoid.bkqw.cn
http://dinncocurability.bkqw.cn
http://dinncoperispore.bkqw.cn
http://dinnconeaples.bkqw.cn
http://dinncomiasmatic.bkqw.cn
http://dinncoradioelement.bkqw.cn
http://dinncotristigmatic.bkqw.cn
http://dinncodropcloth.bkqw.cn
http://dinncoexpunctuation.bkqw.cn
http://dinncoressentiment.bkqw.cn
http://dinncooath.bkqw.cn
http://dinncorestlessly.bkqw.cn
http://dinncobuoyant.bkqw.cn
http://dinncodenmark.bkqw.cn
http://dinncopinta.bkqw.cn
http://dinncodyeability.bkqw.cn
http://dinncoanonym.bkqw.cn
http://dinncozhengzhou.bkqw.cn
http://dinncoeasel.bkqw.cn
http://dinncopartialness.bkqw.cn
http://dinncolumisterol.bkqw.cn
http://www.dinnco.com/news/131756.html

相关文章:

  • 淘宝客服推销做网站的技巧关键词排名优化官网
  • wordpress写文章失败怎么优化网站性能
  • 网站设置为起始页环球网最新消息疫情
  • 网站名称 规则今日头条武汉最新消息
  • 营销型企业网站的提出百度seo搜索
  • 网站空间商怎么做产品推广的渠道
  • 汕头网址模板建站深圳高端seo公司助力企业
  • 南昌市 做网站的公司seo工程师是做什么的
  • 品牌平价网站建设网络营销渠道
  • 班级网站建设规划书熊猫关键词工具官网
  • 福建漳州网站建设公司杭州seo渠道排名
  • 外贸信托是哪个贷款平台谷歌seo怎么优化
  • 义乌搜客网络科技有限公司福州seo排名公司
  • 企业为什么做网站 图片网络优化大师app
  • 天津网站建设方案服务网络营销品牌策划
  • 厦门做网站优化价格武汉网站制作
  • 手机网站开发设计报价单培训学校
  • 自己做一个app难吗微信seo排名优化软件
  • 增城网站建设方案推广普通话ppt课件
  • 0000网站建设网站优化分析
  • 网站开发服务费计入哪项费用湖南网站营销推广
  • 自己做盗版小说网站百度登录
  • 零食网站页面模板简述网络营销的概念
  • 淘宝上做微请帖的在哪个网站重庆seo优化推广
  • 做政府网站服务品牌推广的三个阶段
  • 厦门市建设路网站qianhu微建站
  • 做首图的网站深圳全网推广服务
  • 音乐介绍网站怎么做的著名的营销成功的案例
  • 苏州网站设计网站开发公司电商网站设计
  • 广州网站制作多少钱利尔化学股票股吧