摘要:
当hosts文件配置错误时,用sqlplus登录后startup nomount,就会报错ORA-00000 [oracle11g@testdb2 dbs]$ sqlplus "/ as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Mon A 阅读全文
posted @ 2016-02-04 17:11
馒头斋
阅读(1657)
评论(0)
推荐(0)
摘要:
1.建立索引的时机:若表中的某字段出现在select、过滤、排序条件中,为该字段建立索引是值得的。2.对于like '%xxx'的模糊查询,普通的索引是无法满足的,需要建立全文索引。3.对于有多个条件的,比如: "...where a=xxx and b=yyy","...where a=xxx o 阅读全文
posted @ 2016-02-04 13:19
馒头斋
阅读(1191)
评论(0)
推荐(0)
摘要:
某前台sql语句,简化后如下SELECT products_name,products_viewed FROM `products_description` ORDER BY products_viewed DESC,products_name LIMIT 0,20; 该语句经常大批量出现在慢日志中 阅读全文
posted @ 2016-02-04 13:16
馒头斋
阅读(1675)
评论(0)
推荐(0)
摘要:
相关查询非常慢,通过程序拿到了相关sqlexplainexplain SELECT DISTINCT(o.orders_id), o.oa_order_id, customers_email_address, o.order_type, ot.text AS total_value, o.track 阅读全文
posted @ 2016-02-04 13:14
馒头斋
阅读(325)
评论(0)
推荐(0)
摘要:
where group by联合使用 select 列a,聚合函数 from 表名 where 过滤条件 group by 列a having 过滤条件 group by 字句也和where条件语句结合在一起使用。当结合在一起时,where在前,group by 在后。即先对select xx fr 阅读全文
posted @ 2016-02-04 13:12
馒头斋
阅读(3630)
评论(0)
推荐(0)
浙公网安备 33010602011771号