一个sql 优化 - Oracle / 开发
SQL code:
SQL Statement from editor:
select c0602 "商品编码",c0625 "商品条码",
c0103 "商品名称",c0104 "规格",c0604 "配货件数",
c0605 "配货数量",c0618 "计划赠品数",c0606 "实际出库数",
c0621 "出库赠品数",c0610 "门店实收数",c0611 "实收赠品数",
c0609 "剩余商品入库",c0622 "剩余商品报损"
from c05 t1,c06,vc01 where c0501=c0601 and c0602=c0101
and c0538
between to_date('2009.1.1','yyyy-mm-dd') and to_date('2009.2.28','yyyy-mm-dd')
------------------------------------------------------------
Statement Id=7 Type=INDEX
Cost=2 TimeStamp=21-04-10::09::44:47
(1) SELECT STATEMENT CHOOSE
Est. Rows: 23,043 Cost: 11,365
(10) MERGE JOIN
Est. Rows: 23,043 Cost: 11,365
(7) SORT JOIN
Est. Rows: 23,043 Cost: 6,538
(6) TABLE ACCESS BY INDEX ROWID FZDC.C06 [Analyzed]
(6) Blocks: 34,464 Est. Rows: 35 of 2,411,508 Cost: 9
Tablespace: FZ_DAT
(5) NESTED LOOPS
Est. Rows: 23,043 Cost: 6,017
(3) TABLE ACCESS BY INDEX ROWID FZDC.C05 [Analyzed]
(3) Blocks: 7,944 Est
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
大家好,我现在把oracle服务器上面的原始文件,下载到本机了.我想在本机访问数据库怎么设置啊.是不是类似可以建立一个什么虚拟服务器来实现.请大家出出主意
引用
大家好,我现在把oracle服务器上面 ......
现在有两张表:文章主表A(articleId,articleTitle),文章评论表B(commentId,articleId,commentTitle)
现在我想实现这样的功能:列出文章列表,其中每篇文章标题下面列出此文章的前2个文章评论,请问sql语句怎么写啊 ......
假设table01 中有 以下资料
emp_no emp_name
------- ------------
0001 TOM
0002 JOHN
0003 MARY
常用电话
而我们要得到以下的OUTPUT (或是各种其他的output)
0001,TOM
0002,JOHN
......
tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......