Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
791deb8b
Commit
791deb8b
authored
Nov 01, 2007
by
istruewing@stella.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge stella.local:/home2/mydev/mysql-5.0-axmrg
into stella.local:/home2/mydev/mysql-5.1-axmrg
parents
3707119e
fc888bc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
mysql-test/include/gis_keys.inc
mysql-test/include/gis_keys.inc
+8
-8
No files found.
mysql-test/include/gis_keys.inc
View file @
791deb8b
...
...
@@ -13,20 +13,20 @@ CREATE TABLE t2 (p POINT, INDEX(p));
INSERT
INTO
t1
VALUES
(
POINTFROMTEXT
(
'POINT(1 2)'
));
INSERT
INTO
t2
VALUES
(
POINTFROMTEXT
(
'POINT(1 2)'
));
--
no
index
,
returns
1
as
expected
#
no index, returns 1 as expected
SELECT
COUNT
(
*
)
FROM
t1
WHERE
p
=
POINTFROMTEXT
(
'POINT(1 2)'
);
--
with
index
,
returns
1
as
expected
--
EXPLAIN
shows
that
the
index
is
not
used
though
--
due
to
the
"most rows covered anyway, so a scan is more effective"
rule
#
with index, returns 1 as expected
#
EXPLAIN shows that the index is not used though
#
due to the "most rows covered anyway, so a scan is more effective" rule
EXPLAIN
SELECT
COUNT
(
*
)
FROM
t2
WHERE
p
=
POINTFROMTEXT
(
'POINT(1 2)'
);
SELECT
COUNT
(
*
)
FROM
t2
WHERE
p
=
POINTFROMTEXT
(
'POINT(1 2)'
);
--
adding
another
row
to
the
table
so
that
--
the
"most rows covered"
rule
doesn
't kick in anymore
-- now EXPLAIN shows the index used on the table
# adding another row to the table so that
# the "most rows covered" rule doesn't kick in anymore
# now EXPLAIN shows the index used on the table
# and we're getting the wrong result again
INSERT
INTO
t1
VALUES
(
POINTFROMTEXT
(
'POINT(1 2)'
));
INSERT
INTO
t2
VALUES
(
POINTFROMTEXT
(
'POINT(1 2)'
));
EXPLAIN
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment