SQL添加order by后性能非常慢(也有可能是查询条件)!求高手帮忙优化下。。。 [问题点数:20分,结帖人hackerws2013]

Bbs1
本版专家分:0
结帖率 50%
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:0
求一个ORDER BY 优化
select (a+b+c*d-e) from t <em>order</em> by (a+b+c*d-e)rn(a+b+c*d-e)内容不定rn
高手帮忙优化SQL
首先说明一下背景,最近在用一个客户买的报表工具,这个工具要想显示数据,只能用一个SQL 来处理rn相信做个报表的同仁们都知道,那些SQL 有多复杂了,有时候要经过程序复杂的处理才能在得到我们想rn要展示的数据,就更别提用一个SQL 来满足要求了,要是碰到很烂的数据库设计,那估计要跳楼了rn声明一下,不是我懒,不想在程序里处理,主要是这个报表工具最终生成的是 flash 报表,样式是rn蛮漂亮的,他可以说是一个单独的系统,只接受SQL 语句,最后生成一个URL给我们rn废话不多说了,先看看SQL ,统计每个整点的一个数量,你可以当成是点击量什么的rn[code=SQL]rnselect e.sect,nvl(a.grp_num,0) as a_num,nvl(b.grp_num,0) as b_num,nvl(c.grp_num,0) as c_num, nvl(d.grp_num,0) as d_num fromrn(select to_char(accesstime,'HH24') hourpoint,count(systemname) grp_num from t_portal_todo_info where systemname = 'cms' AND TO_CHAR (accesstime, 'yyyy-MM-dd') = '$searchDate$' group by to_char(accesstime,'HH24')) a,rn(select to_char(accesstime,'HH24') hourpoint,count(systemname) grp_num from t_portal_todo_info where systemname = 'eds' AND TO_CHAR (accesstime, 'yyyy-MM-dd') = '$searchDate$' group by to_char(accesstime,'HH24')) b,rn(select to_char(accesstime,'HH24') hourpoint,count(systemname) grp_num from t_portal_todo_info where systemname = 'eer' AND TO_CHAR (accesstime, 'yyyy-MM-dd') = '$searchDate$' group by to_char(accesstime,'HH24')) c,rn(select to_char(accesstime,'HH24') hourpoint,count(systemname) grp_num from t_portal_todo_info where systemname = 'cxpt' AND TO_CHAR (accesstime, 'yyyy-MM-dd') = '$searchDate$' group by to_char(accesstime,'HH24')) d,rn(select id,sect from T_PORTAL_TODO_H_SECT) ernwhere a.hourpoint(+) = e.sectrnand b.hourpoint(+) = e.sectrnand c.hourpoint(+) = e.sectrnand d.hourpoint(+) = e.sectrn<em>order</em> by e.idrn[/code]rnrnaccesstime 为DATE型字段,精确到时分秒rn下面是我的执行计划,不过我看不懂,不知如何<em>优化</em>,只好请教各位<em>高手</em>了<em>帮忙</em>分析下来rnrnPlanrnSELECT STATEMENT CHOOSECost: 138 Bytes: 7 K Cardinality: 82 rn 18 SORT ORDER BY Cost: 138 Bytes: 7 K Cardinality: 82 rn 17 HASH JOIN OUTER Cost: 112 Bytes: 7 K Cardinality: 82 rn 13 HASH JOIN OUTER Cost: 85 Bytes: 5 K Cardinality: 82 rn 9 HASH JOIN OUTER Cost: 57 Bytes: 4 K Cardinality: 82 rn 5 HASH JOIN OUTER Cost: 30 Bytes: 3 K Cardinality: 82 rn 1 TABLE ACCESS FULL MONITOR.T_PORTAL_TODO_H_SECT Cost: 2 Bytes: 2 K Cardinality: 82 rn 4 VIEW MONITOR. Cost: 27 Bytes: 16 Cardinality: 1 rn 3 SORT GROUP BY Cost: 27 Bytes: 13 Cardinality: 1 rn 2 TABLE ACCESS FULL MONITOR.T_PORTAL_TODO_INFO Cost: 2 Bytes: 13 Cardinality: 1 rn 8 VIEW MONITOR. Cost: 27 Bytes: 16 Cardinality: 1 rn 7 SORT GROUP BY Cost: 27 Bytes: 13 Cardinality: 1 rn 6 TABLE ACCESS FULL MONITOR.T_PORTAL_TODO_INFO Cost: 2 Bytes: 13 Cardinality: 1 rn 12 VIEW MONITOR. Cost: 27 Bytes: 16 Cardinality: 1 rn 11 SORT GROUP BY Cost: 27 Bytes: 13 Cardinality: 1 rn 10 TABLE ACCESS FULL MONITOR.T_PORTAL_TODO_INFO Cost: 2 Bytes: 13 Cardinality: 1 rn 16 VIEW MONITOR. Cost: 27 Bytes: 16 Cardinality: 1 rn 15 SORT GROUP BY Cost: 27 Bytes: 13 Cardinality: 1 rn 14 TABLE ACCESS FULL MONITOR.T_PORTAL_TODO_INFO Cost: 2 Bytes: 13 Cardinality: 1 rnrnrnt_portal_todo_info 表其实有很多的系统类型,字段为systemnamern现在想要的效果是用一个多系列柱状图同时显示4个系统的一个访问量,我上面的<em>sql</em>写了4个,rn可以理解为默认的,其他的可以在页面上更具用户的选择来动态的现实,也就是说我的 accesstime,systemname两个参数rn是从页面传递的,当然每次选择的数量只能是4个,不能多页不能少,时间相同rn
SQL表连接、 order by 优化
select * from (select t2.* from (select rownum r, t1.* from (Select * From (Select * From crm_Vd健康档案 Where 1 = 1 And 有效状态b = '1') T <em>order</em> by 显示顺序, 系统序号) t1 where rownum &amp;lt;= 100) t2 where t2.r &amp;gt; 0...
oracle查询使用order by变慢的优化
oracle版本10.1.0 一条简单的<em>sql</em>,在pl/<em>sql</em>里执行,表里共有20多w条记录: select * from table (1s) select * from table <em>order</em> by date_report desc (18s) 加上<em>order</em> by date_report desc后竟要耗费18秒,这样的速度我想没有客户能接受。   开始<em>优化</em>: 首先在表里建立d
order by 查询太慢,求解决办法!!!
表里有100万数据,想分页查询,结果必须得有排序。 下面是<em>sql</em>语句,显示100行,查询第2页,现在的运行有点慢,大概4、5秒。 如果改成 <em>order</em> by id就很快,不到半秒。 这个排序也不是固定
MySQL高级 之 order by、group by 优化
<em>order</em> by示例示例数据: Case 1 Case 2 Case 3 Case 4 结论:<em>order</em> by子句,尽量使用Index方式排序,在索引列上遵循索引的最佳左前缀原则。 复合(联合)索引形如 key (‘A1’,’A2’,’A3’ ),排序的思路一般是,先按照A1来排序,A1相同,然后按照A2排序,以此类推,这样对于(A1),(A1,A2), (A1,A2,A3)的索引都是有
mysql中使用order by 和limit查询变慢解决办法
本文摘自:http://www.phpfensi.com/my<em>sql</em>/20141008/6772.html本文章来给大家介绍一篇关于my<em>sql</em>中使用<em>order</em> by 和limit查询变慢解决办法,因为在my<em>sql</em>分页利用limit来操作,同时排序也需要使用了<em>order</em> by ,所以经常会两者同是使用到,但是如果数据量大的话就会碰到查询很慢很慢,下面我来给大家介绍解决办法。先来看一下测试<em>性能</em>,代码如...
Oracle sql 优化:增加order by 慢 去掉之后就变快 解决办法
一 问题背景: 1.oracle的版本的为11g 2.数据是由生产库导入部分数据至开发库 3.表为范围分区表 4.<em>order</em> by 的字段为分区表的分区字段 5.数据记录大概有一千万; 5.使用的分析工具为toad10 二 问题描述 1.加上<em>order</em> by的执行计划: 2.去掉<em>order</em> by的执行计划: 三问题分析    步骤1:表<em>order</em> by的字段,
关于sql优化order by
[code=SQL]rnrnSELECT ip, COUNT(ip) ip_count FROM ip_log GROUP BY ip ORDER BY ip_count descrnrnrnSELECT ip, COUNT(ip) FROM ip_log GROUP BY ip ORDER BY COUNT(ip) descrnrn[/code]rnrn请问一下 这两条<em>sql</em>的效率相差大么??rnrn有多大?rnrn还有可以<em>优化</em>的余地了么?rnrn谢谢大家
SQL 优化帮忙
100w的数据量 查一下要几乎1分钟 不可想象 怎么<em>优化</em>下啊?楼主菜鸟[code=<em>sql</em>]rnselect casern when a.type = '1' thenrn '存款'rn when a.type = '2' thenrn '存款'rn when a.type = '3' thenrn '贷款'rn when a.type = '4' thenrn '贷款'rn when a.type = '5' thenrn '贷款'rn when a.type = '6' thenrn '贷款'rn elsern '无数据'rn end as type,rn a.begin_avg,rn a.org_id,rn b.org_name,rn a.manager_id,rn c.group_name as manager_name,rn d.cons_desc,rn a.account_no,rn a.currency_code,rn a.ratio,rn kmh,rn a.customer_id,rn f.customer_name,rn casern when e.is_sx = '2' thenrn '重点'rn elsern '非重点'rn end as is_sx,rn a.Acc_typ,rn a.Store,rn a.amass,rn a.bal_avg,rn a.balancern from asses_jymgr_mx a, bank_list b,rn outer std_group c,rn outer d_cons d,rn outer customer_list_gj e,rn outer customer_list frn where a.org_id = b.org_idrn and a.manager_id = c.group_idrn and a.manager_cons = d.cons_idrn and a.customer_id = e.customer_idrn and a.customer_id = f.customer_idrn and a.year = 2012rn and a.month = 11rn and a.acc_typ = '1'rn[/code]
帮忙优化SQL
select distinct a.file_name as bqyname,a.unique_id as menuid from briocat2 a,bqy_roleright b,portal_userroles c where rnrnc.userid=@userId and b.role_id=c.roleid and a.unique_id=b.resource_id and a.parent_id is not null and a.unique_id not in (select aa.menuid from rnrnportal_indivdetail aa,briocat2 bb where aa.userid=@userId and aa.menuid=bb.unique_id and aa.tabid=2 and bb.parent_id is not null)rnrn这个SQL中,各个表中记录都很少,最多一个表不过3000条左右,因为数据少所有都没有建索引。但是在这个查询中速度却慢得奇怪,竟然需要30~40秒才能查出来。请问大家有何解决办法?谢谢。
有个sql语句求优化order by
[code=SQL]rnrnUSE [HJGINFODB]rnGOrn/****** 对象: Table [dbo].[TB_IP_DUAN] 脚本日期: 09/28/2010 09:56:38 ******/rnSET ANSI_NULLS ONrnGOrnSET QUOTED_IDENTIFIER ONrnGOrnCREATE TABLE [dbo].[TB_IP_DUAN](rn [id] [int] IDENTITY(1,1) NOT NULL,rn [CITY_ID] [int] NOT NULL,rn [StartIP] [bigint] NOT NULL,rn [EndIP] [bigint] NOT NULL,rn CONSTRAINT [PK_TB_IP_DUAN] PRIMARY KEY CLUSTERED rn(rn [id] ASCrn)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]rn) ON [PRIMARY]rnrnrnrnselect top 1 (StartIP-124115011056) as tt,CITY_ID from TB_IP_DUAN rnwhere (StartIP-124115011056)>0rn<em>order</em> by tt ascrnrn[/code]rnrn请问,这个表的索引改如何设计,现在这个<em>sql</em>语句消耗<em>性能</em>比较高rnrn测试通过给满分rn
sql无限添加查询条件
[code=&quot;java&quot;]String condition = &quot; and &quot;; if (null != feeds.getDatetime() &amp;&amp; feeds.getDatetime().trim().length() &gt; 1) { String[] date = feeds.getDatetime().split(&quot;,&quot;); SimpleDateFormat ...
mysql 5.6 order by Limit执行效率问题
今天研发的同事反馈一个<em>sql</em>执行140+s但是<em>sql</em>很简单,<em>也有</em>索引,那么问题出在哪里呢? 经过排查发现,my<em>sql</em>中,<em>order</em> by limit 一起用的时候是有问题的不是我们常用的思路,下面举例说明: select tid, productname, pic, min<em>order</em>, min<em>order</em>unit from `f_product` where cid =
sql加上ORDER BY排序后速度非常
按照这方法:http://www.itooy.com/p_408.html 做了个多关键词搜索功能,但是效率太低,<em>sql</em>要一秒多才执行完 SELECT title,titlepic,smalltext
mysqlorder by导致很慢
my<em>sql</em>的<em>order</em> by导致很慢 解决方法: 我解决的方法是使用FORCE INDEX强制使用索引,为tcug_datetime字段新建一个名字为tcug_datetime的索引(Normal BTREE) SQL例子:http://www.yayihouse.com/yayishuwu/chapter/1962 ...
用了order by以后数据查询特别慢,帮我看下吧
<em>sql</em>语句如下: 排序的两个字段都加了索引, 但现在去掉第二个排序字段的话就<em>非常</em>快,加上就很慢, 我应该怎么处理呢? 大神<em>帮忙</em>看看
sort()排序,另一种解决数据库order by 排序慢的问题
<em>sql</em>语句如果有<em>order</em> by查询变慢,除了在<em>order</em> by列后加索引、修改表空间等等等诸多方法外,还可以在<em>sql</em>中不<em>order</em> by 查询之后在代码中用sort()排个序,因为我的<em>order</em> by后面的的列是前面查询出来的计算列,然后惊喜的发现,在代码里排序竟然比<em>sql</em>中<em>order</em> by  快那么两丢丢。if(list1.size()&amp;gt;0){ for(int i=0;i&amp;lt...
数据库查询非常可能是什么原因,如何解决?
有一个系统,别人作的,我无法修改<em>sql</em>语句。rn现在其运行变得很慢,我在做程序方面修改的情况下,有什么办法提高运行速度吗?rnrn谢谢
sql优化sql性能
提高<em>sql</em>语句执行效率,书写高质量<em>sql</em>语句
mybatis:sql查询条件有时间时查询效率非常
参考文档:习惯守望 &amp;lt;if test=&quot;end != null&quot;&amp;gt; &amp;lt;![CDATA[ and bdsj &amp;lt; TO_date('${end}','yyyy-mm-dd hh24:mi:ss') ]]&amp;gt; &amp;lt;/if&amp;gt; &amp;lt;if test=&quot;start != null&quot;&amp;gt; &amp;lt;![CDATA[ and bdsj &
mybatis sql查询条件有时间时查询效率非常
最近在进行开发时发现一个奇葩的问题,<em>sql</em>在数据库查询速度不过1秒都不到在在后台却发现<em>非常</em>慢,通过打印dao方法时间和看mybatis log发现速度确实是很慢不是其他问题,然后一步步测试,首先加上 加在整个<em>sql</em>都没用,然后加上判断发现时间快了点,但还是属于慢,这里发现很奇葩的问题,比如网上查询时间段说什么&gt;,=要转义,经过一步步测试我可以直接写&gt; ,不过&lt; 实践才是那什么真理的,通过
SQL查询非常慢???
我的机子在一次掉电之后,运行SQL查询分析器的速度<em>非常</em>慢?查询一个只有6条记录的select 都要4秒。启动也是<em>非常</em>的慢,,以前的速度都是十分理解哦?其它的程序都不受影响。????
oracle 中 like , order by 很慢,应该怎么优化
select c.* from CMS_ARTICLE c where c.cmar_State = 6 and c.cmar_Is_Delete = 2 and c.id != 7601291732
MySQL数据库order by 主键(索引) 查询慢解决方案
https://blog.csdn.net/hehexiaoxia/article/details/54585175  
mysql关于order by效率很慢的问题
select ts.uploadDate, tv.carNumber as CarNumber, tv.id as VinId,tu.nick as Nick, tu.userName as User
关于 order by 导致查询慢
查询 select a.columns, b.columns,c.columns --columns表示多列数据,不代表列名称 from TA a left join TB b on a.xx=b.x
SQL数据传输非常
有一台电脑连接<em>sql</em>数据库,执行查询语句时(如select * from t1),在其它电脑上只需要2秒,在这个电脑上需要2分钟,但都是局域网,且网络一切正常.rn请各位大侠看一下<em>可能是</em>什么问题?rnrnrn目前使用:<em>sql</em> management studio 来直接连接数据库进行测试
SQL求高手优化
[code=SQL]rnselect count(*) as countValue from( rnselect ta.asset_name,ta.type_name,ta.name,ta.t_assets_sep_id, rn(select count(*) from t_assets t where t.t_assets_sep_id=ta.t_assets_sep_id and ((t.pastdue_type='1' AND ((assets_day_date-(sysdate-mader_date))0 and (assets_day_date-(sysdate-mader_date))0 and (instore_date+(USEFUL_LIFE*365))-sysdate0 or t.gq>0rnrn[/code]rnrnwhere t.egq>0 or t.gq>0 加了这句速度慢了N被 ....求<em>优化</em>rn
VB Access group by,order by查询速度超慢,求指点优化
使用ACCESS数据库,查询大约6W条记录,然后将查询结果绑定到VSFLEXGRID, 查询出来的结果只有30条rn但耗时实在让人无法接受,求<em>高手</em>指教!rn代码如下:rnDim tmpRS As New ADODB.Recordsetrn '<em>sql</em>Str = "SELECT * FROM [tbDATA] WHERE ID IN (SELECT MAX(ID) FROM [tbDATA] GROUP BY Process_No) ORDER BY ID ASC" '耗时:2219msrn '<em>sql</em>Str = "SELECT * FROM [tbDATA] WHERE ID IN (SELECT MAX(ID) FROM [tbDATA] GROUP BY Process_No)" '耗时:115msrn '<em>sql</em>Str = "SELECT * FROM [tbDATA] WHERE ID IN (SELECT MAX(ID) FROM [tbDATA] GROUP BY Process_No) ORDER BY ID,Process_No ASC" '耗时:2219msrn '<em>sql</em>Str = "SELECT * FROM [tbDATA] WHERE ID IN (SELECT MAX(ID) FROM [tbDATA] GROUP BY Process_No) ORDER BY Process_No ASC" '耗时:2729msrn <em>sql</em>Str = "SELECT * INTO TempTB FROM [tbDATA] WHERE ID IN (SELECT MAX(ID) FROM [tbDATA] GROUP BY Process_No)" '耗时:2687ms 本想先将查询结果放入一个临时表,然后再排序绑定rn tmpRS.Open <em>sql</em>Str, tmpCN(ch), 1, 1rn Set VSFlexGrid3(ch).DataSource = tmpRSrnrn上述代码,查询快的时候,绑定就慢,查询慢的时候,绑定就慢rn补充:VB环境下使用ADO查询,ACCESS数据库,ID为主键,有索引,其他列无索引
超级复杂的查询条件,如何优化性能..........求求兄弟们了,高手们了!
我有两张表,一张基本表:A,1000条记录; 一张数据表:B,5000多条记录...rnrn现在情况是这样子的,A有个字段,可以包含B表中的1-5000个信息的使用权(把对应的ID存在了A表的某字段中)rnrn有用需求必须要将A表中包含的N条B表的记录信息打印出来...rnrn由于页面量访问量<em>非常</em>大,又要分页,导致数据库CPU 100%,如果我将信息CACHE到缓存中的话,那WEB服务器CPU 100%rnrn具体SQL如下:rnSelect Top 20 * From B Where Tag=5 and (bl_ID In(2988,3059,3086,2463,2302,1611,2366,2231,2059,2058,2056,2054,3027,3021,3020,3019,3018,3017,3016,3003,3001,2948,2908,2891,2842,2817,2763,2727,2702,2664,2625,2325,2323,2295,2277,2275,2273,2252,2251,2250,2249,2248,2247,2206,2204,2201,2195,2153,2145,2138,2137,2135,2134,2132,2130,2129,2127,2123,2119,2117,2114,2109,2107,2106,1950,1949,1913,1911,1910,1909,1907,1906,1905,1903,1901,1900,1899,1898,1895,1883,1882,1881,1879,1871,1833,1831,1830,1829,1828,1827,1826,1825,1824,1821,1820,1817,1813,1808,1807,1805,1804,1803,1802,1801,1800,1799,1797,1795,1794,1793,1792,1791,1790,1789,1788,1786,1783,1781,1780,1769,1767,1751,1740,1731,1727,1722,1712,1706,1693,96,290,353,359,476,544,690,3034,3032,2927,2887,2881,2860,2822,2810,2766,2703,2695,2690,2667,2582,2565,2548,2525,2503,2499,2489,2483,2480,2478,2477,2476,2475,2470,2469,2468,2467,2448,2446,2443,2440,2439,2435,2429,2428,2421,2420,2419,2417,2416,2415,2412,2410,2347,2346,2338,2335,2334,2324,2322,2321,2316,2310,2308,2306,2305,2304,2301,2300,2298,2293,2291,2289,2288,2287,2285,2284,2283,2282,2281,2279,2278,2276,2271,2269,2266,2265,2264,2263,2262,2261,2243,2242,2241,2240,2229,2228,2227,2225,2224,2223,2222,2221,2207,2205,2202,2197,2175,2174,2173,2172,2171,2170,2169,2168,2167,2166,2165,2164,2162,2161,2160,2159,2158,2122,2120,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992,1976,1974,1973,1972,1951,1948,1946,1810,1703,1686,1685,1684,1683,1682,1674,1672,1671,1670,1669,1667,1662,1644,1643,1642,1641,1640,1639,1638,1637,1636,1635,1634,1627,1614,1613,1612,1610,1609,1607,1588,1587,1585,1574,1561,1560,1555,1544,1538,111,112,104,106,108,109,93,100,135,144,150,206,223,234,266,437,537,548,560,579,582,583,647,654,712,714,739,754,777,786,792,848,866,889,908,937,938,945,963,979,985,986,999,1014,1031,1032,1033,15,1069,1087,1110,1118,1135,1136,1144,1147,1148,1150,1164,1179,1192,1193,1198,1199,1204,1206,1223,1224,1227,1232,1247,1249,1262,1342,1387,1419,3035,3030,3029,3028,3015,3014,3013,3012,3011,3010,3008,3007,3002,2992,2983,2965,2961,2945,2942,2941,2940,2939,2938,2937,2936,2935,2933,2932,2930,2929,2919,2882,2865,2852,2829,2823,2814,2661,2583,2567,2539,2497,2495,2405,2404,2403,2402,2401,2400,2399,2383,2376,2365,2364,2357,2356,2355,2354,2352,2345,2343,2329,2326,2319,2294,2280,2274,2272,2270,2268,2267,2237,2236,2235,2234,2233,2230,2215,2213,2212,2211,2210,2209,2203,2200,2199,2196,2192,2189,2188,2187,2185,2184,2183,2182,2180,2179,2178,2177,2152,2146,2143,2142,2141,2139,2136,2131,2128,2126,2125,2124,2116,2115,2112,2111,2105,2104,2102,2101,2100,2098,2097,2096,2095,2094,2093,2091,2090,2089,2088,2086,2085,2083,2082,2081,2080,2079,2078,2076,2074,2073,2072,2071,2070,2069,2068,2067,2065,2064,2063,2062,2061,2057,2055,2052,2051,2050,2048,2047,2046,2045,2044,2043,2042,2041,2040,2039,2038,2037,2036,2035,2034,2033,2032,2031,2030,2029,2028,2026,2025,2024,2023,2021,2020,2019,2018,2017,2016,2015,2010,2009,2008,2006,2005,2003,1918,1842,1839,1815,1759,1750,1749,1734,1709,1708,1679,1594,1522,57,58,59,60,19,12,136,141,215,220,417,524,623,624,625,626,700,716,749,750,914,931,1011,1125,1268,1269,3080,3081,3082,3079,3078,3070,3071,3072,3073,3074,3075,3076,3077,3063,3064,3065,3067,3068,3061,3060,3058,3062,2901,2573,3054,3055,3056,3053,3057,3004,3052,3051,3050,3048,3049,3047,3031,3046,3045,3044,3043,3042,3006,429,3041,3040,3039,3038,3037,3036,3033,3026,3025,3024,3023,3022,3005,2909,2729,2737,2655,2838)) Order By bl_ID Descrnrnrnrnrn搞得我头痛了个把月了,兄弟们啊,给点好的建议或解决办法吧.rnrn存储过程啊什么的,提点思路也行啊.
在线等待-高手帮忙-XP启动非常非常慢55555555!!
不知道为什么,查毒没什么毒
sqlserver count,order by 查询慢
表中数据 700万条左右,29个字段,自动增长列设为主键, 使用count(1) 查询总条数需要1分钟, select top 1000 字段名 from 表 <em>order</em> by 时间(该字段有重复值和
order by 实在是太影响速度了
加了<em>order</em> by 排序实在是太慢了,用存储过程也一样慢,各位大神有什么办法<em>优化</em>一下啊
mysql加了order by特别慢的问题
my<em>sql</em> info表,id 主键 自增长 数据20万左右 用<em>order</em> by id 特别慢 select id,title from info <em>order</em> by id desc limit 8010
order by 不走索引的思考
 MySql<em>性能</em><em>优化</em>,<em>order</em> by 不走索引的思考2009-07-12 11:43今天早上查看网站,发现<em>非常</em>慢!进linux 用top查看,发现my<em>sql</em> cpu到了100%。开始怀疑是my<em>sql</em><em>性能</em>的问题,不会10万条数据就卡成这样吧?虽然我的linux是在服务器上放了个虚拟机,但也不至于10万条记录挂啊? 网上找了一大把文章,my.cnf也设置了,我虚拟机内存是2G,将key_buf设置成512M 还是卡。<em>非常</em>郁闷! 最后没办法,只能用explain来
ORACLE 10G以后的ORDER BY操作优化
最近系统上线,经常发现有ORDER BY操作的查询缓慢,观察执行计划发现,<em>优化</em>器进行了ORDER BY 列上的索引INDEX FULL SCAN操作且执行计划少了SORT ORDER BY操作。 SQL> select column_name from dba_ind_columns where index_name = 'I_DJXH_1'; COLUMN_NAME -----
高手帮忙!SQL语句加上union后不能用order by?????
如下句:rnSELECT DATE,SC_NO,SC_NAME,TOTAL,OLD_TOTAL FROM 2002\03SCXS WHERE DATE >= 03-21-2002 AND SC_NO='2' UNION SELECT DATE,SC_NO,SC_NAME,TOTAL,OLD_TOTAL FROM 2002\04SCXS WHERE DATE =< 04-05-2002 AND SC_NO='2' <em>order</em> by date descendingrn给出错误:ORDER BY clause is invalid.rn去掉<em>order</em> by 字句没有问题。但是我要排序呀。(foxpro数据表)rnrn
sql查询条件的组合,各位朋友,求帮忙,谢谢!
各位大虾:小弟在写程序的时候遇到一个这样的SQL查询需求,还请给位朋友<em>帮忙</em>出出主意。rnrn一个产品最多用三种零件,根据使用的零件去查询产品。rnrn第一种情况:我选择了A、B两种零件,按照组合进行查询产品rnrn产品名称 零件1 零件2 零件3rn 产品1 A B (空或者其他零件)rn 产品2 A (其他零件) Brn 产品3 B A (空或者其他零件) rn 产品4 B A (空或者其他零件)rn 产品5 (其他零件) A Brn 产品6 (其他零件) B Arnrn根据编写的SQL问查询出来的结果应该是如上所示的。rnrn第二种情况就是选择了A、B、C三种零件,也需要按照组合进行查询rnrn产品名称 零件1 零件2 零件3rn 产品1 A B Crn 产品2 A C Brn 产品3 B A C rn 产品4 B C Arn 产品5 C A Brn 产品6 C B Arnrnrn请各位大虾赐教,SQL文如何编写,每种情况写一个,union也行,或者写成一个SQL文,谢谢!!rnrn
慢SQL优化总结
关于in和exists的使用 1.当父查询结果集小于子查询结果集则选择exists,如果父查询结果集大于子查询结果集选择in。(可尝试等价改写) in和exists都有子查询<em>优化</em>,提升子查询,有时候这两的执行计划一样。需要注意的是如果子查询包含了父查询里面的条件,in不会被<em>优化</em>。 2.in里面的值一般不超过100个 3.单表postgre<em>sql</em>的in和个数关系不大,都可以走索引。 4.当有连表并且...
sql优化
各位大侠能不能帮我<em>优化</em>一个<em>sql</em>,有几个类似的<em>sql</em>每天导致我的数据库报警。。。。目前发现是groupby导致的慢,但是不知道怎么<em>优化</em>,我能想到的只有是把结果集(800条)拿出来,放到内存中再排序,所有表数据量都不大,顶多就1000多行。麻烦大家<em>帮忙</em>看下。<em>非常</em>感谢rnselect m.id,rn m.name,rn m.parentId,rn m.type,rn m.is_type,rn m.tvsetsnumber,rn (rnselect count(*)rn from productmovie m1rn where m1.state= 1rn AND m1.is_type= 2rn AND m1.parentId= m.id) as updateTvsetsnumber,rn lfadvert,rn m.director,rn m.actor,rn m.area,rn m.year,rn m.terrorismIndex,rn i.img_path as movieImageUrlrn from movielabel c,rn productmovie m,rn imageresource irn WHERE m.state= 1rn AND m.is_type= 1rn AND m.parentId= -1rn AND i.pcId= m.idrn and i.glass= 1rn AND i.type= 1rn and i.shape= 2rn AND i.state= 1rn AND i.platform & 1rn AND m.fenlei<> 1194rn group by movieId DESCrn limit 10[/size]
慢SQL的优化建议
慢SQL的<em>优化</em>建议 created by:张恒 前言:在工作过程中,本人在处理天眼查数据时遇到了不少慢SQL的问题。此外,也结合同事工作中遇到的问题,在如何<em>优化</em>大数量查询时积累了一点点经验,应钢哥要求,做一些整理,不足之处,希望一起探讨改进。 关于SQL语句 1.SQL中尽量避免范围查询,如果必须使用,应当放在AND条件的最后使用。 错误示例 &amp;amp;lt;if test=&amp;quot;begin != nul...
db2 有order by 查询速度慢问题
我的<em>sql</em>语句如下,SELECT T83005,T83006,T83010,T83020,T83030,T83040,T83050,T83070,T83080,T83510,T83520,T83530
mysql 加了orderby 查询速度超级慢怎么办
SELECT DISTINCT c.uniqueid, r.`name`, r.CustomerPhone, r.TocallerPhone, r.bound, r.Elapsed, r.LastTi
oracle sql加排序变慢
-
当发现Oracle的Order by严重的影响了SQL性能,我们该怎么办?
原因分析:由于内存区域不够,Oracle 使用磁盘的内存空间进行排序操作,这样就导致了I/O影响SQL<em>性能</em> 解决方式: 1.在排序字段上加索引,但是这个对<em>性能</em>的提升不明显,因为排序是在返回的结果集中完成。 2.可以尝试配置PGA,使其进行自动管理这块内存区域,让Oracle的排序在内存中完成。 不用重启DB,直接在线修改。 SQL&amp;gt;alter system set workar...
order by 影响速度的问题
我有一个SQL,如下 SELECT z.* (SELECT ... FROM ...) z <em>order</em> by z.a, z.b , z.c 执行速度很慢,把<em>order</em> by去掉以后变快了;我知道在or
慢SQL优化In PostgreSQL
1、Create Index Directly 2、Change Conditions to Use Index 3、尽量避免在where子句中对字段进行运算,导致查询规划器放弃使用index 4、尽量避免在where子句中对字段类型进行强制转换,导致查询规划器放弃使用index 5、少用outer join,减少不必要的sub-query层级数【在不影响得到正确结果的前提下】 6、坚决避免select * 和 redundant columns【多余字段】 7、Index on Expressions 8、Partial Indexes 9、Decompose DDL【分解DDL】 10、Comprehensive optimization【综合<em>优化</em>】 11、索引的创建 12、查找需要删除的索引 13、查找重复的索引 14、查找需要维护的索引,并自定创建索引维护SQL 15、一个index size影响query plan的例子
高手帮忙优化语句
求<em>高手</em><em>帮忙</em><em>优化</em>rn with hisdatarn as (select sum(1) over(partition by usersub.mobile,sub.substation_id,alarm.type,alarm.level,ai.pidrn <em>order</em> by usersub.mobile,sub.substation_id,alarm.type,alarm.level,ai.pid,cdatetime ) xhrn ,sub.pnamern ,sub.substation_idrn ,ai.pidrn ,ai.item_codern ,itm.item_name item_namern ,his.cdatetimern ,(case when sub.sub_type=5 then his.cvalue else his.cvtval end) valrn ,std.highrn ,usersub.mobilern ,alarm.typern ,(case when sub.sub_type=5 then (case when info.admin_code in (1,2) then alarm.alarm_value else 2*alarm.alarm_value end)rn when sub.sub_type=6 then (case when info.admin_code in (1,2)rn then (case alarm.alarm_value when 6 then 2 when 10 then 4 when 14 then 6 when 24 then 8 end)rn else (case alarm.alarm_value when 6 then 4 when 10 then 8 when 14 then 12 when 24 then 16 end) end)rn end) alarm_valuern ,max(cdatetime) over(partition by ai.pid) maxdatern from hisdata_1h hisrn inner join tai airn on his.pid=ai.pidrn and ai.item_code in (201,311,316)rn and his.cdatetime>=trunc(sysdate,'hh')-2.5 and his.cdatetime=trunc(sysdate,'hh')-2.5 and his0.cdatetime10rn inner join pollution_info inforn on sub.pcode_c=info.enterprise_codern and sub.pcode=info.pwk_codern and sub.stcode=info.stcodern and sub.cyear=info.cyearrn inner join v_wp_standard stdrn on ai.item_code=std.item_codern and ai.scope_id=std.scope_idrn and ai.poll_standard = std.standardrn inner join v_user_substation usersubrn on sub.substation_id=usersub.substation_id and usersub.mobile is not nullrn inner join alarm_define alarmrn on type in (11,13)rn and usersub.level>=alarm.levelrn left join station_status strn on sub.substation_id=st.substation_idrn and not (st.endtime=his.cdatetime+1/24)rn and ((st.type_code in (25,27) and (st.code in (5,6) or st.code=ai.item_code)) or st.type_code=23)rn and st.check=1rn and his.cdatetime=st.starttimern where st.substation_id is nullrn )rn select mobilern ,pnamern ,typern ,item_namern ,alarm_valuern ,to_char(maxdate,'mm')||'月'||to_char(maxdate,'dd')||'日'||to_char(maxdate,'hh24')||'时' dtrn ,sum(case when cdatetime>=trunc(sysdate,'hh')-alarm_value/24 then 1 else 0 end) smsrn from hisdatarn where cdatetime>=trunc(sysdate,'hh')-(2+alarm_value)/24rn and type=11rn group by mobile,substation_id,pname,item_name,maxdate,type,larm_valuern having sum(case when cdatetime>=trunc(sysdate,'hh')-alarm_value/24 and valhigh then 1 else 0 end) = 1rn and sum(case when cdatetime=trunc(sysdate,'hh')-(1+alarm_value)/24 and val>high then 1 else 0 end)=0rn and sum(case when cdatetime>=trunc(sysdate,'hh')-alarm_value/24 then 1 else 0 end)>alarm_value*0.8rn union allrn select h1.mobilern ,h1.pnamern ,h1.typern ,h1.item_namern ,h1.alarm_valuern ,to_char(h1.maxdate,'mm')||'月'||to_char(h1.maxdate,'dd')||'日'||to_char(h1.maxdate,'hh24')||'时' dtrn ,sum(case when h1.cdatetime>=trunc(sysdate,'hh')+(1-h1.alarm_value)/24 and h1.val=h2.val then 1 else 0 end)+1 smsrn from hisdata h1rn inner join hisdata h2rn on h1.mobile=h2.mobilern and h1.pid=h2.pidrn and h1.xh = h2.xh+1rn and h1.alarm_value = h2.alarm_valuern where h1.cdatetime>=trunc(sysdate,'hh')-(h1.alarm_value)/24rn and h1.type=13rn and h2.type=13rn group by h1.mobile,h1.substation_id,h1.pname,h1.item_name,h1.maxdate,h1.type,h1.alarm_valuern having sum(case when h1.cdatetime>=trunc(sysdate,'hh')+(1-h1.alarm_value)/24 and h1.val<>h2.val then 1 else 0 end)=0rn and sum(case when h1.cdatetime=trunc(sysdate,'hh')+(1-h1.alarm_value)/24 and h1.val=h2.val then 1 else 0 end)=1rn and sum(case when h1.cdatetime=trunc(sysdate,'hh')+(-h1.alarm_value)/24 and h1.val=h2.val then 1 else 0 end)=0rn and sum(case when h1.cdatetime>=trunc(sysdate,'hh')+(1-h1.alarm_value)/24 and h1.val=h2.val then 1 else 0 end)+1>h1.c0109_alarm_value*0.8
MySQL order by、group by底层实现及优化非常详细)
在Innodb引擎下Order by实现: 在MySQL中<em>order</em> by有两种排序方式: 1.利用有序索引获取有序数据 2.文件排序 通过explain分析查询时,利用有序索引获取有序数据显示Using index。而文件排序显示Using filesort using index:所需的数据在index中即可全部获得,无需再到表中取数据,如果是主键索引,数据直接从表中得到。 usi...
oracle order by 求帮优化
select A.aId, (select count(1) from B where B.aId = a.aId) c from An<em>order</em> by cnn表A有30W+数据n表B有18W+数据n用上面<em>sql</em>查要10分钟,如果去掉<em>order</em> by则在2秒内,求<em>高手</em>指导怎么<em>优化</em>
高手帮忙优化存储过程
CREATE OR REPLACE PROCEDURE SP_DOC_FREIGHT_INQUIRY(OUTCURSOR OUT IMS.PKG_CURSOR.T_CURSOR,rn V_PAGESTART IN NUMBER DEFAULT NULL,rn V_PAGESIZE IN NUMBER DEFAULT NULL,rn V_PAGESORT IN VARCHAR DEFAULT NULL,rn V_AUDIT_STATUS IN CSC.BM_APP_FREIGHT.AUDIT_STATUS%TYPE,rn V_DATE_FROM IN VARCHAR2,rn V_DATE_TO IN VARCHAR2,rn V_SERVICE IN CSC.BM_APP_HEADER.SERVICE%TYPE,rn V_VESSEL IN CSC.BM_APP_HEADER.VESSEL%TYPE,rn V_VOYAGE IN CSC.BM_APP_HEADER.VOYAGE%TYPE) ASrn P_ROW_COUNT NUMBER DEFAULT 0;rnBEGINrnrn DELETE DOC_FREIGHT_INQUIRY_TEMPORARY;rnrn IF V_AUDIT_STATUS IS NULL THENrn rn INSERT INTO DOC_FREIGHT_INQUIRY_TEMPORARYrn SELECT DISTINCT F.APP_ID AS APP_ID,rn F.FREIGHT_ID AS FREIGHT_ID,rn F.AUDIT_STATUS AS AUDIT_STATUS,rn D.BL_NO AS BL_NO,rn F.FREIGHT AS FREIGHT,rn F.CURRENCY AS CURRENCY,rn F.REMARK AS REMARK,rn F.AUDIT_USER AS AUDIT_USER,rn F.AUDIT_TIME AS AUDIT_TIME,rn H.POR AS POR,rn H.POL AS POL,rn H.POD AS POD,rn H.DEL AS DEL,rn H.DEST AS DEST,rn F.POP AS POP,rn F.PAYER AS PAYER,rn F.FREIGHT_TYPE AS FREIGHT_TYPE,rn F.LOCK_IND AS LOCK_IND,rn F.LOCK_USER AS LOCK_USER,rn F.LOCK_DATE AS LOCK_DATErn FROM CSC.BM_APP_FREIGHT Frn LEFT JOIN CSC.BM_APP_HEADER H ON F.APP_ID = H.APP_IDrn LEFT JOIN CSC.BM_APP_DETAIL D ON F.APP_ID = D.APP_IDrn LEFT JOIN CSC.BM_APP_ROUTING R ON F.APP_ID = R.APP_IDrn WHERE (V_SERVICE IS NULL OR H.SERVICE = V_SERVICE)rn AND (V_VESSEL IS NULL OR H.VESSEL = V_VESSEL)rn AND (V_VOYAGE IS NULL OR H.VOYAGE = V_VOYAGE)rn AND (F.AUDIT_STATUS IS NULL OR F.AUDIT_STATUS IN ('0', '1'))rn AND (V_DATE_FROM IS NULL ORrn R.LAST_UPDATE_DATE >= TO_DATE(V_DATE_FROM, 'YYYY-MM-DD'))rn AND (V_DATE_TO IS NULL ORrn R.LAST_UPDATE_DATE < TO_DATE(V_DATE_TO, 'YYYY-MM-DD') + 1)rn AND (R.STATUS = 'F1')rn AND (F.FREIGHT_TYPE IN ('COD', 'LPS', 'MAF', 'OWF'));rn rn ELSIF V_AUDIT_STATUS = '1' THENrn rn INSERT INTO DOC_FREIGHT_INQUIRY_TEMPORARYrn SELECT DISTINCT F.APP_ID AS APP_ID,rn F.FREIGHT_ID AS FREIGHT_ID,rn F.AUDIT_STATUS AS AUDIT_STATUS,rn D.BL_NO AS BL_NO,rn F.FREIGHT AS FREIGHT,rn F.CURRENCY AS CURRENCY,rn F.REMARK AS REMARK,rn F.AUDIT_USER AS AUDIT_USER,rn F.AUDIT_TIME AS AUDIT_TIME,rn H.POR AS POR,rn H.POL AS POL,rn H.POD AS POD,rn H.DEL AS DEL,rn H.DEST AS DEST,rn F.POP AS POP,rn F.PAYER AS PAYER,rn F.FREIGHT_TYPE AS FREIGHT_TYPE,rn F.LOCK_IND AS LOCK_IND,rn F.LOCK_USER AS LOCK_USER,rn F.LOCK_DATE AS LOCK_DATErn FROM CSC.BM_APP_FREIGHT Frn LEFT JOIN CSC.BM_APP_HEADER H ON F.APP_ID = H.APP_IDrn LEFT JOIN CSC.BM_APP_DETAIL D ON H.APP_ID = D.APP_IDrn LEFT JOIN CSC.BM_APP_ROUTING R ON H.APP_ID = R.APP_IDrn WHERE (V_SERVICE IS NULL OR H.SERVICE = V_SERVICE)rn AND (V_VESSEL IS NULL OR H.VESSEL = V_VESSEL)rn AND (V_VOYAGE IS NULL OR H.VOYAGE = V_VOYAGE)rn AND (F.AUDIT_STATUS = V_AUDIT_STATUS)rn AND (V_DATE_FROM IS NULL ORrn R.LAST_UPDATE_DATE >= TO_DATE(V_DATE_FROM, 'YYYY-MM-DD'))rn AND (V_DATE_TO IS NULL ORrn R.LAST_UPDATE_DATE < TO_DATE(V_DATE_TO, 'YYYY-MM-DD') + 1)rn AND (R.STATUS = 'F1')rn AND (F.FREIGHT_TYPE IN ('COD', 'LPS', 'MAF', 'OWF'));rn rn ELSIF V_AUDIT_STATUS = '0' THENrn rn INSERT INTO DOC_FREIGHT_INQUIRY_TEMPORARYrn SELECT DISTINCT F.APP_ID AS APP_ID,rn F.FREIGHT_ID AS FREIGHT_ID,rn F.AUDIT_STATUS AS AUDIT_STATUS,rn D.BL_NO AS BL_NO,rn F.FREIGHT AS FREIGHT,rn F.CURRENCY AS CURRENCY,rn F.REMARK AS REMARK,rn F.AUDIT_USER AS AUDIT_USER,rn F.AUDIT_TIME AS AUDIT_TIME,rn H.POR AS POR,rn H.POL AS POL,rn H.POD AS POD,rn H.DEL AS DEL,rn H.DEST AS DEST,rn F.POP AS POP,rn F.PAYER AS PAYER,rn F.FREIGHT_TYPE AS FREIGHT_TYPE,rn F.LOCK_IND AS LOCK_IND,rn F.LOCK_USER AS LOCK_USER,rn F.LOCK_DATE AS LOCK_DATErn FROM CSC.BM_APP_FREIGHT Frn LEFT JOIN CSC.BM_APP_HEADER H ON F.APP_ID = H.APP_IDrn LEFT JOIN CSC.BM_APP_DETAIL D ON H.APP_ID = D.APP_IDrn LEFT JOIN CSC.BM_APP_ROUTING R ON H.APP_ID = R.APP_IDrn WHERE (V_SERVICE IS NULL OR H.SERVICE = V_SERVICE)rn AND (V_VESSEL IS NULL OR H.VESSEL = V_VESSEL)rn AND (V_VOYAGE IS NULL OR H.VOYAGE = V_VOYAGE)rn AND (F.AUDIT_STATUS IS NULL OR F.AUDIT_STATUS = V_AUDIT_STATUS)rn AND (V_DATE_FROM IS NULL ORrn R.LAST_UPDATE_DATE >= TO_DATE(V_DATE_FROM, 'YYYY-MM-DD'))rn AND (V_DATE_TO IS NULL ORrn R.LAST_UPDATE_DATE < TO_DATE(V_DATE_TO, 'YYYY-MM-DD') + 1)rn AND (R.STATUS = 'F1')rn AND (F.FREIGHT_TYPE IN ('COD', 'LPS', 'MAF', 'OWF'));rn rn END IF;rnrn SELECT COUNT(1) INTO P_ROW_COUNT FROM DOC_FREIGHT_INQUIRY_TEMPORARY;rnrn OPEN OUTCURSOR FORrn SELECT W.*,rn sys_guid() as FREIGHT_INQUIRY_ID,rn null as CREATED_BY_USER,rn null as CREATED_OFFICE,rn sysdate as CREATED_DTM_LOC,rn sysdate as CREATED_TIME_ZONE,rn sysdate as UPDATED_BY_USER,rn null as UPDATED_OFFICE,rn sysdate as UPDATED_DTM_LOC,rn null as UPDATED_TIME_ZONE,rn 0 as RECORD_VERSION,rn 'CSCL' as PRINCIPAL_GROUP_CODE,rn P_ROW_COUNT AS MAX_ROW_NOrn FROM (SELECT N.*, ROWNUM AS ROW_NOrn FROM (SELECT L.*rn FROM DOC_FREIGHT_INQUIRY_TEMPORARY Lrn ORDER BY L.APP_ID, L.FREIGHT_ID, L.BL_NO) N) Wrn WHERE ROW_NO BETWEEN V_PAGESTART AND V_PAGESTART + V_PAGESIZE - 1;rnrnEND;rnrnrn查询速度比较慢,各位大大看有没有办法<em>优化</em>一下
请问对几百万级数据量 Order by 主键 查询如何优化啊?
数据库版本:11g 数据量:8百万 使用语句 SELECT * FROM oe.product_information ORDER BY PRODUCT_ID DESC; Select出500行需要4
数据库 select效率问题
-
MySQL查询优化之十-ORDER BY优化(ORDER BY Optimization)
MySQL查询<em>优化</em>之十-ORDER BY<em>优化</em>(ORDER BY Optimization) 如需转载请标明出处:http://blog.csdn.net/itas109 QQ技术交流群:12951803 环境: MySQL版本:5.5.15 操作系统:windows 本文讨论ORDER BY<em>优化</em>(ORDER BY Optimization)。 本文介绍MySQL何时可以使用索引...
MySQL Order By实现原理分析和Filesort优化
在MySQL中的ORDER BY有两种排序实现方式: 1、利用有序索引获取有序数据 2、文件排序 在使用explain分析查询的时候,利用有序索引获取有序数据显示Using index。而文件排序显示Using filesort。 1.利用有序索引获取有序数据           取出满足过滤条件作为排序条件的字段,以及可以直接定位到行数据的行指针信息,在 Sort Buff
请教关于MYSQL中order by的效率优化
我们用到了两个数据量比较大的表,表table1和表table2,每个表的数据都是四五百万条。 table1三个字段:id(主键),age,name table2两个字段:id(主键),status 执
with as语句性能优化
语句如下:rnWITH g AS( select owner, steps from T1 ) SELECT g.Owner FROM g WHERE g.Steps = (SELECT MIN(Steps) FROM g)rn rnwith中的子查询很快,只有几条数据,<0.1秒,但是加了后面的语句,用来取出结果中最少的那个step所对应的用户,结果需要10秒左右,我不知道<em>性能</em>消耗在哪里?应该如何<em>优化</em>?rnrnrn rn
高手帮忙优化下SQL语句
select top 20 Projects.id,Projects.Project_PayMin,Projects.Project_PayMax,rnProjects.Project_SelectBiddingPay,Projects.Project_Name,Projects.Project_EndTime,rnProjects.Project_State ,Projects.Project_Class rnfrom Projects inner join Project_Type on Projects.Project_Type=Project_Type.idrn where Project_State<>0 and Project_State<>5 rnand Project_State<>6 and (Project_Pay_isTrust=1 or WKSiteid<>11) rn and Project_TypeFatherId=1 and Projects.id rnnot in (select top 0 Projects.id from Projects where Project_State<>0 rn and Project_State<>5 and Project_State<>6 and (Project_Pay_isTrust=1 or WKSiteid<>11) rn and Project_TypeFatherId=1 <em>order</em> by Projects.Project_BeginTime desc) rn<em>order</em> by Projects.Project_BeginTime descrnrnrnrn就这个SQL 语句 数据有点多 执行有点慢rn
SQL高手帮忙优化一下
update LCGrpCont set Peoples2 = (rn select count(distinct InsuredNo)rn from LCPolrn where GrpContNo = '00025046000001'rn and PolTypeFlag = '0'rn and AppFlag = '1') , OnWorkPeoples = (rn select count(*)rn from LCInsured a, LCCont brn where a.ContNo = b.ContNorn and a.GrpContNo = '00025046000001'rn and a.InsuredStat = '1'rn and b.AppFlag = '1') , OffWorkPeoples = (rn select count(*)rn from LCInsured a, LCCont brn where a.ContNo = b.ContNorn and a.GrpContNo = '00025046000001'rn and a.InsuredStat = '2'rn and b.AppFlag = '1') , OtherPeoples = (rn select count(distinct InsuredNo)rn from LCPolrn where GrpContNo = '00025046000001'rn and PolTypeFlag = '0'rn and AppFlag = '1') -(rn select count(*)rn from LCInsured a, LCCont brn where a.ContNo = b.ContNorn and a.GrpContNo = '00025046000001'rn and a.InsuredStat = '1'rn and b.AppFlag = '1') -(rn select count(*)rn from LCInsured a, LCCont brn where a.ContNo = b.ContNorn and a.GrpContNo = '00025046000001'rn and a.InsuredStat = '2'rn and b.AppFlag = '1')rn where GrpContNo = '00025046000001'
MySQL数据库SQL优化order by 语句
<em>优化</em>ORDER BY 语句之前,首先来了解一下MySQL中排序方式。先看customer 表上的索引情况 my<em>sql</em>&amp;gt; show index from customer; +----------+------------+-------------------+--------------+-------------+-----------+-------------+---------...
求SQL 查询条件
table1rn a b(varchar) c(varchar) d(varchar) e(varchar)rn-- 200701rn-- 200701rnb,c,d,e 都是日期格式格式為:200701rn我想查出table中数据rn<em>查询条件</em>是 20070101--20070131rn条件是 b 不为空时 查处符合输入条件的数据rn如果b 为空时 查处crn如果c 为空 查询drnrn谢谢大家!
MySQL高级知识(九)——order by优化
MySQL高级知识(九)——<em>order</em> by<em>优化</em>准备案例总结 此博客的内容主要来源于尚硅谷的视频中,在此记录,以备以后自己查看。 准备 创建test表 drop table if exists test; create table test( id int primary key auto_increment, c1 varchar(10), c2 varchar(10), c3 varc...
mysql order by 原理和优化
原理 利用索引的有序性获取有序数据 利用内存/磁盘文件排序获取结果 1) 双路排序:是首先根据相应的条件取出相应的排序字段和可以直接定位行数据的行指针信息,然后在sort buffer 中进行排序。 2)单路排序:是一次性取出满足条件行的所有字段,然后在sort buffer中进行排序。 <em>优化</em>方式 给<em>order</em> by 字段增加索引,<em>order</em>by的字段必须在最前面设置 接下来给来说一下ord
MySQL关于order by和group by的优化
<em>order</em> by关键字<em>优化</em> 尽量使用index方式排序,避免使用filesort方式排序 create table tblA( #id int primary key not null auto_increment, age int, birth TIMESTAMP not null ); insert into tblA(age,birth) values(22...
MySQL查询优化order by的优化
原文地址:https://dev.my<em>sql</em>.com/doc/refman/5.7/en/<em>order</em>-by-optimization.html 译文: 8.2.1.14ORDER BY <em>优化</em> 本节描述MySQL何时可以使用索引来满足<em>order</em> by子句,不能使用索引时使用的文件排序操作,以及<em>优化</em>器提供的有关<em>order</em> by的执行计划信息 有和没有limit的<em>order</em> by子句可能会返回...
mysql优化之 ORDER BY Optimization
Use of Indexes to Satisfy ORDER BY在某些情况下,MySQL可以使用索引来满足ORDER BY子句,以避免执行filesort操作时涉及的额外排序。如果所有未使用的索引部分和所有额外的ORDER BY字段,在WHERE子句中都是和常量比较,那么即使ORDER BY字段与索引不完全匹配,也可以使用索引。假设(key_part1,key_part2)上有索引。以下查询将...
sql 语句优化,求帮忙
Select t9.Product_ID,a.Product_Name,a.Product_BuyNum, b.Org_Price, b.Sale_Price, c.Img_Small, c.Img_Middle,nisnull((select SubShop_Price from subshop_product where subshop_id=1057 and product_id=a.product_id),b.Sug_Price) as SubShop_Price, b.Sug_Price,a.Product_SeeNum,a.AddTime,na.<em>order</em>id From n(n Select Top 30 product_id from n (n Select row_number() over(<em>order</em> by a.product_id desc) as rownumber,a.product_id n From Product_Info a n Inner Join Product_Price b On a.Product_ID = b.Product_ID n Inner Join SubShop_ProductRight d ON a.Class_ID = d.Class_ID AND d.SubShop_ID=1057 n Where ((a.SubShop_ID is null or a.SubShop_ID=-1) or ((a.SubShop_ID=1057 or a.Is_AllShow=0 ) and Is_Audit=0)) n and a.IsHidden = 0 And a.IsDelete = 0 n And a.Product_Name Like '%%' and a.Product_ID n not in (select product_id from SubShop_Product where IsHidden=1 and SubShop_ID=1057) n ) t n where rownumber>4170 Order By rownumbern) as t9 ninner join Product_Info a on a.Product_ID=t9.Product_ID nInner Join Product_Price b On a.Product_ID = b.Product_ID left Join Product_Detail c On a.Product_ID = c.Product_IDnnrownumber>4170 这个数值会根据不同页数变化,求解怎么<em>优化</em>,这个占用CPU很高,导致系统速度慢
帮忙优化sql语句
大哥、大姐们:rn 请帮我看看,谢谢了,我就50分了,全给了。rn 要求是查出第一段时间内(我的<em>sql</em>里4月1号到9月1号),间隔几周(我<em>sql</em>里是3周),某个星期几(代码里是1和4)的日期,我这个将查询时间段拉长,间隔时间改小,就算不出来了,请<em>帮忙</em><em>优化</em>下,多谢。[code=<em>sql</em>]Select tdate, weekrn From (Select to_char(c1, 'yyyymmdd') tdate,rn decode(to_char(c1, 'd'),rn '1',rn 'seven',rn '2',rn 'one',rn '3',rn 'two',rn '4',rn 'three',rn '5',rn 'four',rn '6',rn 'five',rn '7',rn 'six') weekrn From (rn --得出每个周日和往前推6天的日期rn Select Distinct c1 - Level + 1 c1rn From (rn --根据最小的日期一次往前推3周rn Select c1 + (3 * 7) *rn (Level - 1) c1rn From (rn --计算为周日的最小日期rn Select Min(c1) c1rn From (rn --构造4月1号到9月1号的日期表rn Select to_date('2013-04-01','yyyy-mm-dd') + Level - 1 c1rn From dualrn Connect By Level < 8rn Order By c1)rn Where c1 >= to_date('2013-04-01','yyyy-mm-dd'))qrn Where Exists (Select weekrn From ( /**将某字段,由逗行分隔的值转成列**/rn Select REGEXP_SUBSTR('one,four', '[^,]+', 1, rownum) As weekrn From DUALrn Connect By ROWNUM )) + 1) wrn Where w.week = q.week)[/code]
Spark SQL性能优化
rn rnrnrn rn 大数据一卡通!可学赵强老师(Oracle认证讲师)全部课程,仅售799元(原价5273元),还送漫威授权机械键盘+CSDN 20周年限量版T恤!rn rn rn 点此链接购买:rn rn rn rn rn rn https://edu.csdn.net/topic/teachercard?utm_source=jsk20xqyrnrnrn rn rn rn rnrn购买课程后,可扫码进入学习群,获取赵强老师答疑 rnrn rnrnrn rnrnrn rnrnrn 本系列课程将基于RedHat Linux 7.4版本、Hadoop 2.7.3、Spark 2 版本全面介绍大数据的整体内容,让学员深入理解并掌握运行机制和原理,从而进一步掌握大数据的相关内容。rn
优化Sql查询性能
以下代码是查找Access数据库中1月份的目标、实绩的查询语句,我现在要查询一年(1-12月)的数据,我写了12条以下的查询语句进行查询,但是<em>性能</em>很差,运行起来很慢,请问有什么办法可以提高运行<em>性能</em>?谢谢!rnrn //获得1月份的目标、实绩、达成率//rn TRs = DB2Conn.Execute("SELECT 本月目标 FROM 销售目标 WHERE 客户代码 = '" & ID & "' AND 所属月份 = '" & cYear & "01'")rn cTarget1 = CInt(TRs("本月目标")) //目标数//rn ARs = DB2Conn.Execute("SELECT SUM(出货产品明细联合.出货数) AS 出货数 " _rn + "FROM 出货记录主表联合 INNER JOIN 出货产品明细联合 ON 出货记录主表联合.序号 = 出货产品明细联合.序号 " _rn + "WHERE 出货记录主表联合.终端客户='" & ID & "' AND 出货记录主表联合.会计月='" & cYear & "01'")rn cActual1 = CInt(ARs("出货数")) //实绩数//rn cCompletionRate1 = CInt(cActual1/cTarget1*100) //达成率//rn
优化SQL性能.pptx
有关<em>sql</em><em>优化</em>的建议,使用的是Oracle数据库,主要是<em>sql</em>编写的一些经验和建议,帮助写好<em>sql</em>语句,提高<em>sql</em>的<em>性能</em>或可读性。
每天进步一点点——优化order by 语句
<em>优化</em>ORDER BY语句前,首先了解下MySQL中的排序方式。 my<em>sql</em>>show index from customer\G; *************************** 1. row***************************        Table: customer   Non_unique: 0     Key_name: PRIMARY  Seq_
MySQL如何利用索引优化ORDER BY排序语句
官网排序<em>优化</em>:http://dev.my<em>sql</em>.com/doc/refman/5.5/en/<em>order</em>-by-optimization.html MySql创建索引时支持ASC或DESC排序。 下面举例 创建表时同时创建索引降序排序(sname 字段上普通索引降序) create table tbl1 ( id int unique, sname varchar(50),
同时使用top和order by 导致sql执行非常慢。求大神指点。
SELECT top 20 p.id AS id, p.masterId AS masterId, p.revision AS revision, p.state AS states, p.creat
SQL游标中Order By的使用限制
  在创建游标的SELECT语句中使用了Order By子句,与非游标中select语句中的<em>order</em> by子句不同,只有在查询的select子句中出现的列才可以作为<em>order</em> by子句中出现的列。 例子: declare book_cusor cursor for select bookid,bookname,publish,price,reader from bookinfo o...
mysql优化2-exists用法及order by及慢日志查询
exists 的用法 select * from t where t.deptId in (select id from s) 等于 select * from t where exists (select 1 from s where s.id=t.deptId) <em>order</em> by 慢日志查询( show global status like '%Slo...
SQL性能全面优化
SQL<em>性能</em>全面<em>优化</em>,很好的文档,大家一齐分享
SQL性能调整及优化
有关SQL调优,感兴趣的可以下载。,内容涉及多个方面:SQL语句执行的过程、ORACLE<em>优化</em>器,表之间的关联,如何得到SQL执行计划,如何分析执行计划等内容。
改写sql优化性能
1. select … FROM a, c rnWHERE a.userid = c.idrnand a.winRatio >= 0 rn<em>order</em> by case when leaderboardmarkid=1200000081 then 0 else 1 end, a.roiinperiod desc 如何<em>优化</em>这部分: case when leaderboardmarkid=1200000081 then 0 else 1 endrn rn加上他,<em>性能</em>差很多。。。rnrn2. SELECT TOP (42) rn [Element1].[id] AS [id], rn [Element1].[userId] AS [userId], rn [Element1].[originatorUserId] AS [originatorUserId]rn FROM (SELECT [Extent1].[id] AS [id], [Extent1].[createdAtUtc] AS [createdAtUtc]rn FROM [dbo].[Comment] AS [Extent1]rn WHERE (([Extent1].[securityId] IN (7, 144, 185, 455, 566, 574, 1095, 1361, 1417, 1464, 1483, 1640, 2070, 2629, 4691, 4754, 4836, 4838, 5615, 6679, 8686, 9148, 9161, 9240, 9260, 9272, 9288, 9311, 9393, 9456, 9481, 9503, 9515, 9539, 9616, 9649, 9656, 10130, 10361, 10370, 10375, 10376, 10398, 10437, 10464, 10477, 11690, 12256, 12340, 12375, 12772, 13002, 13483, 13536, 16548, 17083, 17361, 17396, 19489, 20801, 21350, 23640, 23708, 23744, 24121, 24398, 25076, 27888, 29451, 30939, 32375, 32391, 32463, 32689, 32696, 32840, 35026, 35208, 35602, 35797, 36007, 36071, 36073, 36396, 36461, 36493, 36575, 37163, 37175, 37302, 44209, 44655, 44801, 45675, 47229, 47431, 48130, 48620, 51405, 51763, 53127, 57103, 58153, 58454, 59582, 60109, 81354, 84501, 88983, 92273, 92299, 94714, 97359, 97456, 123118, 123326, 140279, 140733, 143787, 152011)) OR (([Extent1].[userId] IS NOT NULL) AND ([Extent1].[userId] IN (321235, 562001, 562005, 562018)))) AND ( EXISTS (SELECT rn 1 AS [C1]rn FROM [dbo].[TimeLineItem] AS [Extent2]rn WHERE ([Extent1].[id] = [Extent2].[commentId]) AND ([Extent2].[originatorUserId] = [Extent1].[userId]) AND ([Extent2].[originatorDeletedAtUtc] IS NULL)rn )) ) AS [Filter2]rn OUTER APPLY (SELECT TOP (1) rn [Extent3].[id] AS [id]rn rn FROM [dbo].[TimeLineItem] AS [Extent3]rn WHERE ([Extent3].[commentId] = [Filter2].[id]) AND ([Extent3].[originatorUserId] = [Extent3].[userId]) ) AS [Element1]rn ORDER BY [Filter2].[createdAtUtc] DESC rn其中comment 表要scan 两次,如何修改? 另外,此处out apply 如何能转换成 join? 此处没有函数,为啥会用apply
sql 性能 优化原则
索引带来查询上的速度的大大提升,但索引也占用了额外的硬盘空间(当然现在一般硬盘空间不成问题),而且往表中插入新记录时索引也要随着更新这也需要一定时间. 有些表如果经常insert,而较少select,就不用加索引了.不然每次写入数据都要重新改写索引,花费时间;
sqlite3求优化sql语句性能
数据库中存在二个表,rn<em>sql</em>ite> .sche applicationrnCREATE TABLE `Application`(rn`Id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,rn`Handle` text unique not null,rn`Name` text unique NOT NULL,--rn`Category` int NOT NULL,-- rn`Subcategory` int NOT NULL,--rn`Technology` int NOT NULL ,--rn`Risk` int NOT NULL ,rn`Protocol` text NOT NULL ,--rn`Description` text default '',rn`Icon` text default ''rn);rn rn<em>sql</em>ite> .sche appcodernCREATE TABLE `AppCode`(rn`EnumType` int not null, --1 Category; 2 Subcategory; 3 Technology; 4 Risk;rn`Type` int not null,rn`ParentType` int NOT NULL,rn`Name` textrn);rnrn其中appcode为application的关联表,rn比如,application 的Category如果取字符串形式的值就需要去appcode表EnumType=1及appcode.Type=application.Category的appcode.Name的值。rnrn其他的同理。rnrnrn总记录约600条rn现取某一条件的count(*),<em>sql</em>文如下:rnselect count(*) from Application A, AppCode C, AppCode S, AppCode T, AppCode R where A.Category = C.Type and C.EnumType = 1 and A.Subcategory = S.Type and S.EnumType = 2 and A.Technology = T.Type and T.EnumType = 3 and A.Risk = R.Type and R.EnumType = 4 ;rnrn时间需要1秒半多,请问如何<em>优化</em>??谢谢。rn
mysql order by limit slow 慢查询
最近项目中遇到很奇怪的事情 言简意赅: 背景:数据量大约在300万左右, id为主键,有一个有好几个字段的索引, INDEX_1(f1,f2,f3,f4) , <em>sql</em> <em>查询条件</em>为 f1=1, w5=xx,w6=zz.....,<em>order</em> by id desc limit 10; 加上where条件之后总的查询结果集才3条, 查询时间在 7秒左右,但是去掉<em>order</em> by id desc ,查询就变...
MySQL ORDER BY IF() 条件排序
在做<em>sql</em>zoo的时候,碰到一个SQL的排序问题,他把符合条件的单独几行,可以放在查询结果的开始,或者查询结果的尾部 通过的方法就是IN语句(也可以通过IF语句)   自己做了个测试,如下,这个是表的所有内容   使用ORDER BY配合IF语句 比如我想将species为snake的行数,单独列出来,我可以这样查询 SELECT * FROM pet ORDER BY if (...
sql2008 order by desc 查询速度慢
公司一台<em>sql</em>2008服务器,select * from lm_<em>order</em> where businessdate between '2013-04-15 00:00:00' and  '2013-04-30 00:00:00'  <em>order</em> by id asc 速度很快,几乎不到1秒即可查出结果,但业务逻辑要求倒排序,<em>order</em> by id desc 查询出结果需要36秒,分析查询计划,统计信息,
Oracle使用Order By后性能缓慢
各位好! 我在Oracle执行一段SQL,查询的结果大概有2万多条记录。如果不在Order by 语句的时候,查询的时间不到20S。但是如果如果加上Order By 子句,查询的<em>性能</em>就特别差,要十多分
sql 大数据查询慎用 order by
<em>order</em> by建议使用索引今天在<em>sql</em> 查询中一个表中查询花了至少20秒时间,数据为620000行,<em>sql</em>语句如下:测试一:使用<em>order</em> by 单单只是查询0,10行数据,耗时27.888sselect a.id,a.county_id,a.county_name,a.town_id,a.town_name,a.village_id,a.village_name,b.province as p...
求SQL高手帮忙
[img=https://img-bbs.csdn.net/upload/201308/01/1375320537_381670.jpg][/img]rnrn用表1得表2rn按<em>order</em>ID排序 找出所有的name 并统一放到同一列中。rnrn注意:只要SQL语句,能实现吗?存储过程都不需要。只要语句。rnrn求大手。
高手帮忙 SQL
三个用户A B CrnA 今天发了30条信息rnB 昨天发了30条信息rnc 今天发了30条信息,但早于Arnrn要求: 第一,用户必须交叉排序,第二,某一个用户的信息必须是最新的在最前面rn 查询结果为:A1,C1,B1,A2,C2,B2.....A30,C30,B30rn求各位<em>sql</em><em>高手</em><em>帮忙</em>rn在线等!!!!
高手帮忙,求SQL
比如表结构是这样的table1(id,user,keyword,datetime)rnid是自动增长,user是提交的用户,keyword可以重复,datetime是提交的时间rnrn根据根据时间排序显示,显示的时候keyword只能显示唯一的(就像group by),rn有重复的keyword显示最新的rnrn我的问题就是单单用group by 好像不能取到最新,能不能用一句<em>sql</em>搞定呢?rnrn...max(datetime) ... group by keyword 这样只能取得最新的datetime,rn我想取到最新的那条记录id,user,keyword,datetime,应该怎么写这个SQL?rnrnid user keyword datetimern01 s1 k1 05-12-12rn02 s2 k2 05-12-11rn03 s3 k2 05-12-13rn04 s4 k3 05-12-10rnrn我希望group以后得到的结果是rnid user keyword datetimern03 s3 k2 05-12-13rn01 s1 k1 05-12-12rn04 s4 k3 05-12-10rn
sql高手帮忙
表1 Vrnrn DW_ID KM_ID BM_ID VALrn 101 201 301 123.00rn 102 202 302 500.00rn 103 203 303 600.00rnrn表2 DY (对应表)rnrn BASE_id DY_FIELDrn 1 DW_IDrn 2 KM_IDrnrn表3 BASErnrn id namern 1 sx01rn 2 sx02rnrn表4 SX01rnrn ID DY_IDrn 8001 101 rn 8002 102 rnrn表5 SX02rnrn ID DY_ID rn 7002 202 rn 7003 203 rnrn完全对应上的显示:rn第一个SQL结果为:rnrnSX01_ID SX02_ID BM_ID VALrnrn8002 7002 302 500.00rnrnrnrn否则没有对应上的显示:rn第二个SQL结果为:rnrnDW_ID KM_ID BM_ID VALrn101 201 301 123.00rn103 203 303 600.00
sql高手帮忙优化一个oracle的sql
<em>sql</em>语句如下:rn[code=SQL]rnselect /*+index(t,PK_aidszh_sgra_adult_info_his)*/rn f.id_record as id,rn f.zonecode as postcode,rn (select cnnamern from zonecodern where zonecode = substr(f.zonecode, 1, 2) || '000000') as prov,rn (select cnnamern from zonecodern where zonecode = substr(f.zonecode, 1, 4) || '0000') as city,rn (select cnnamern from zonecodern where zonecode = substr(f.zonecode, 1, 6) || '00') as district,rn f.orgcode as site_code,rn (select orgname from aidszh_sgra_organise where orgcode = f.ORGCODE) as site_name,rn t.antin as card_code,rn t.pid as ptid,rn t.patient_name as name,rn t.id as ic,rn f.addrcode as addr_county,rn (select ZONENAME from zonecode where zonecode = f.addrcode) as addr_name,rn f.addr1 as addr_town,rn f.addr as addr_door,rn f.flwno as visit_n,rn (casern when f.is_flw = 1 and f.clinic_treatment <> 3 thenrn '1'rn when f.end_cause = 1 thenrn '2'rn when f.end_cause = 2 thenrn '3'rn when f.end_cause = 3 thenrn '4 'rn when (f.clinic_treatment = 3 and f.is_flw = 1) thenrn '5'rn elsern '1'rn end) as flw_status,rn f.CD4 as f5cd4,rn f.CD8 as f5cd8,rn to_char(f.DT_CD8BLOOD, 'yyyy-mm-dd') as f5cdt,rn f.VIRULN as f5vl,rnrn f.OTHER_CLINIC as fotherrn from aidszh_sgra_adult_info_his t,rn aidszh_sgra_adult_newstatus_h h,rn aidszh_sgra_adult_flw_his frn where t.card_id = f.card_idrn and t.FLAG = 2rn and t.card_id = h.card_idrn and f.ZONECODE like '210726%'rn and f.TM_CREATE < to_date('2010-06-01', 'yyyy-mm-dd')rn[/code]rnrn其中,aidszh_sgra_adult_info_his 数据量8w,rnaidszh_sgra_adult_newstatus_h 数据量8w,aidszh_sgra_adult_flw_his 数据量80w目前执行时间为3.5s,执行计划如下:rn[img=http://hi.csdn.net/attachment/201006/12/44893_12763269219nut.jpg][/img]rnrnrn我发现以上执行计划表AIDSZH_SGRA_ADULT_NEWSTATUS_H走全表扫描,于是建了一个索引,在看执行计划,的确走了索引,但效率并没有提高,还是3.5s。rnrn请<em>sql</em><em>高手</em><em>帮忙</em><em>优化</em>一下,控制在2s以内!
c语言各种类型数据介绍下载
五种基本数据类型:字符、整型、单精度实型、双精度实型和空类型。尽管这几种类型数据的长度和范 围随处理器的类型和C语言编译程序的实现而异,但以bit为例,整数与CPU字长相等,一个字符通常为一个字 节,浮点值的确切格式则根据实现而定。对于多数微机,表2-1给出了五种数据的长度和范围。 相关下载链接:[url=//download.csdn.net/download/fmc15992/2941025?utm_source=bbsseo]//download.csdn.net/download/fmc15992/2941025?utm_source=bbsseo[/url]
线段树中文教程【信息技术竞赛】下载
线段树结构英文介绍,by failedbamboo 相关下载链接:[url=//download.csdn.net/download/SaintSolo/3185382?utm_source=bbsseo]//download.csdn.net/download/SaintSolo/3185382?utm_source=bbsseo[/url]
TonyShare仿糗事百科 v2.2下载
本系统是仿糗事百科主要功能。适合于建立以分享内容、网友可以评论互动等功能为主的网站。 V2.2版本重大改进: 考虑到很多用户对MS SQL2005数据库操作不熟悉,V2.2新增了自动安装功能。不需要再用ms sql management studio数据库管理工具进行创建数据库和导入数据。 试用版除功能有小小限制,其他功能和正式版完全一样。 安装说明: 1、把所有文件上传到虚拟主机 2、运行http://你的网址/install/default.aspx按照提示进行安装 后台管理: 1、后台管理要先在前台登录验证,具有超级管理员权限的用户才可以继续登录后台。 用户名:228 相关下载链接:[url=//download.csdn.net/download/huangxuan518/5101985?utm_source=bbsseo]//download.csdn.net/download/huangxuan518/5101985?utm_source=bbsseo[/url]
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法
我们是很有底线的