[OSM-dev] Database Schema (was Re: [OSM-talk] Oh dear - planet has duplicate id's)
Jon Burgess
jburgess777 at googlemail.com
Sat Jun 23 21:58:13 BST 2007
On Sat, 2007-06-23 at 12:02 +0100, Tom Hughes wrote:
> Please let me know what you think folks...
I ran a mysql index analyzer[1] and it pointed out that the
`ways_id_version_idx` was redundant since the left part of the primary
key will provide the same indexing.
--
-- Table structure for table `ways`
--
CREATE TABLE `ways` (
`id` bigint(64) NOT NULL default '0',
`user_id` bigint(20) default NULL,
`timestamp` datetime default NULL,
`version` bigint(20) unsigned NOT NULL auto_increment,
`visible` tinyint(1) default '1',
PRIMARY KEY (`id`,`version`),
KEY `ways_id_version_idx` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3414768 DEFAULT CHARSET=utf8;
The only other comments generated by this tool referred to the unused
area_segments table.
[1]: http://mysql-index-analyzer.blogspot.com/
Jon
More information about the dev
mailing list