|
Table Scan Hell
Last post 08-11-2006 9:20 AM by versatilia. 8 replies.
-
08-09-2006 3:08 PM
|
|
-
-
emurphy


- Joined on 01-14-2005
- Granada Hills, CA
- Posts 512
|
db2: Making your most selective WHERE conditions part of AND/OR decisions that refer to both sides of your self-join = BAD DEVELOPER, NO BISCUIT.
Do you mean something like this? select a.x, b.y from a, b where a.m = b.n or a.p = b.q as opposed to select a.x, b.y from a join b on a.m = b.n union select a.x, b.y
from a join b on a.p = b.q
|
|
-
-
qbolec


- Joined on 05-14-2006
- Posts 90
|
Could anyone tell me, why, even though I have indexed each column, and explain select count( distinct visits) from stats says it's going to use it, still select count( distinct visits) from stats takes several seconds (while the result is 442, which in most brain-dead way I could invented leads to 442 btree records being read?). I'm referring to MySQL server. Is it so hard to determine the number of nodes in the btree? Is it due to some parallel issues?
And the query I was really interested in was Select Sum(visits) From stats, which I was sure should take about 441 additions and multiplications, but I'll forgive the optimizer lack of arithmetic knowledge...but still...what are those btrees for, then - just to find a specific row ? What a waste of potential potential
|
|
-
-
-
Nick


- Joined on 01-12-2006
- Posts 2
|
[Obvious joke about mysql not being a real database]
[Lame recommendation to try postgresql, oracle, sqlite, etc]
Something clever.
|
|
-
-
-
-
Page 1 of 1 (9 items)
|
|
|