So... there is an index, and it's supposedly used:
mysql EXPLAIN SELECT id, province, latitude, longitude, AsText(coordinates),
s_ts_r_m, quartersection FROM qs WHERE
MBRContains(GeomFromText('POLYGON((51.62582589 -114.82248918,51.65126254
-114.82248918,51.65126254 -114.78150333,51.62582589
Hi;
mysql select * from products;
2009/12/27 Victor Subervi victorsube...@gmail.com:
mysql select * from products;
[...]
mysql select last_insert_id() from products;
[...]
Now, I was expecting 1, not 0! What up?
[...] LAST_INSERT_ID() (no arguments) returns the first
automatically generated value successfully inserted for
an
On Sun, Dec 27, 2009 at 11:27 AM, Mattia Merzi mattia.me...@gmail.comwrote:
2009/12/27 Victor Subervi victorsube...@gmail.com:
mysql select * from products;
[...]
mysql select last_insert_id() from products;
[...]
Now, I was expecting 1, not 0! What up?
[...] LAST_INSERT_ID() (no
last_insert_id() returns the last id auto-incremented in *the current
session*. If you disconnect and reconnect, it can not be retrieved.
- michael dykman
On Sun, Dec 27, 2009 at 11:42 AM, Victor Subervi
victorsube...@gmail.com wrote:
On Sun, Dec 27, 2009 at 11:27 AM, Mattia Merzi
On Sun, Dec 27, 2009 at 12:00 PM, Michael Dykman mdyk...@gmail.com wrote:
last_insert_id() returns the last id auto-incremented in *the current
session*. If you disconnect and reconnect, it can not be retrieved.
Ahah! So how do I retrieve the last id inserted irrespective of connection?
TIA,
Victor Subervi wrote:
On Sun, Dec 27, 2009 at 12:00 PM, Michael Dykman mdyk...@gmail.com wrote:
last_insert_id() returns the last id auto-incremented in *the current
session*. If you disconnect and reconnect, it can not be retrieved.
Ahah! So how do I retrieve the last id inserted
At 11:13 AM -0500 12/27/09, you wrote:
Hi;
mysql select * from products;
On Sun, Dec 27, 2009 at 1:30 PM, Gary Smith li...@l33t-d00d.co.uk wrote:
Victor Subervi wrote:
On Sun, Dec 27, 2009 at 12:00 PM, Michael Dykman mdyk...@gmail.com
wrote:
last_insert_id() returns the last id auto-incremented in *the current
session*. If you disconnect and reconnect, it
Steve Edberg wrote:
(2) autoincrement values are not reused after deletion, so if you
deleted the record with ID=1000 inserted in (1), the next
autoincrement would still be 1001, even if the existing records are
IDs 1,2,3. This is usually the desired behavior, but again, may not be
what *you*
Gary Smith skrev:
...
An example of where it wouldn't be: Although ID is auto_increment, you
could define a row as, say, '10005583429'. This would be a valid input.
Selecting max(id) would return that number. However, auto_increment
wouldn't change - it would still be '34' (or whatever) for
Gary Smith wrote:
Steve Edberg wrote:
(2) autoincrement values are not reused after deletion, so if you
deleted the record with ID=1000 inserted in (1), the next
autoincrement would still be 1001, even if the existing records are
IDs 1,2,3. This is usually the desired behavior, but again, may
I'm new to MySQL and I'm looking for some guidance. I have a table A,
with two columns X and Y with the following data:
| X|Y|
1 24
1 25
2 25
2 26
3 27
I want my SQL query to return 2 following this verbose logic:
On 12/27/2009 06:04 PM, Tim Molter wrote:
I'm new to MySQL and I'm looking for some guidance. I have a table A,
with two columns X and Y with the following data:
| X|Y|
1 24
1 25
2 25
2 26
3 27
I want my SQL query
Unless I am missing something, this should work.
SELECT DISTINCT X FROM `A`
WHERE Y IN (25)
AND Y NOT IN (24)
Chris W
Tim Molter wrote:
I'm new to MySQL and I'm looking for some guidance. I have a table A,
with two columns X and Y with the following data:
| X|Y|
1
So just to clarify (hello?), the index which *should* be used (EXPLAIN says so)
and *should* make the query run faster than 4 seconds either isn't used (why?)
or simply doesn't speed up the query (again, why?).
Hmm, weird. I just re-imported the data (after drop/create table, etc.), and
now the spatial queries run fast.
Has anyone seen this sort of thing happen? Maybe the Index got corrupted
somehow, and then MySQL had to do a full table scan (even though EXPLAIN
indicated it would use the Spatial
17 matches
Mail list logo