---
title: "oracle 、sql优化记录"
author: "smartzjp"
date: "2012-09-12T11:48:11Z"
tags: []
categories: ["数据库"]
slug: "oracle-sql"
draft: false
lastmod: "2012-09-12T11:48:11Z"
id: 1676731
url: "https://smartzjp.iteye.com/blog/1676731"
---

1、一同事过来问我执行结果问什么慢、后来经过调试才发现 他习惯性的 select * from table1 left join table2 on 1=1 and xxx. 具体原理不清楚、但是去掉on 1=1 之后、速度变得非常快

2、大家都知道order by 是很影响性能的、昨天碰一现象 order by cols 与 order by desc 执行时间上差距很大。