Re: any way to speed up count(*)?
Date: Wed, 25 Nov 2009 22:04:14 +0100
joel garry schreef:
> On Nov 25, 8:19 am, Mark D Powell <Mark.Powe..._at_hp.com> wrote:
>> On Nov 24, 7:22 pm, m..._at_pixar.com wrote: >> >> >> In you your example why do you have where 1 = 1 ? Kind of unnecessary >> isn't it.
> I have an example pinned up on my cube of an OCI generated code that
> has 48 1=1 statements in it. It would be even more unnecessary for me
> to try to get rid of them. :-)
> I'm sure there must be more somewhere in this kind of code, that one
> just happened to catch my eye in EM one day. Doesn't seem to bother
> the optimizer at all.
> _at_home.com is bogus.
> Death of wikipedia, news at 11. http://news.cnet.com/8301-1023_3-10403467-93.html
Most times, these queries are generated by some tool that needs a where clause anyway, and 'AND's or 'OR's the user specified clauses to it, and they put in the 1=1 for when a user does not enter any condition..
(What's in = What's in) Received on Wed Nov 25 2009 - 15:04:14 CST