Re: geometry with MySQL-5.0

2006-06-19 Thread Gaspar Bakos
Hi, RE: > And finally, you can expect weird messages from mysqladmin. > E.g. mysqladmin --sort-index on the geometry table works for some I meant to say myisamchk, and not mysqladmin. Gaspar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http:/

Re: sort-index on geometry always fails

2006-06-19 Thread Gaspar Bakos
Hi, John, RE:> > Seems like myisamcheck --sort-index does not work with spatial > > indexing? > or you have a disk error. I tried it on another computer, and -- unfortunately -- the same effect. Also tried it on the same computer, and different partition of the RAID-5 array. I kind of believe th

Re: geometry with MySQL-5.0

2006-06-19 Thread Gaspar Bakos
Hello Gilles, RE: > I am discovering the Spatial Extensions features of MySQL-5.0 > Is there a way to use a spherical geometry ? (instead of Euclidean) > like for navigation, or on sky coordinates,... As far as MySQL-5.0, I have not found any such feature. I believe it is available in the recent

sort-index on geometry always fails

2006-06-15 Thread Gaspar Bakos
Hi, I have a table that stores geometry information in one column in "point" type. After freshly uploading the table, myisamcheck --sort-index reports an error: - Sorting index for MyISAM-table 'TEST_I14_GEOM' myisamchk: Unknown error 126 myisamchk: error: Can't read key block from filepos: 7199

Re: fixed or dynamic row sizes with point

2006-06-13 Thread Gaspar Bakos
Hi, RE: > we have a table with many (~0.5 billion) records and a geometry field > which was defined as a simple "point". The `show table status` shows that > the row format is dynamic, however, a simple point in the GIS > representation has a fixed format (see: WKB: 21 bytes: 1 for MSB/LSB, 4 > f

Re: my-huge.cnf quite outdated (fwd)

2006-06-12 Thread Gaspar Bakos
Hi, Daniel, RE: > I've had a big time looking for configs over the net and manuals, > ended search with this: > http://dev.mysql.com/doc/refman/5.0/en/server-parameters.html [...] Thanks for the links, I will check them again. I read most of those that are available on the web. > their way easil

Re: my-huge.cnf quite outdated (fwd)

2006-06-12 Thread Gaspar Bakos
-- Forwarded message -- Date: Mon, 12 Jun 2006 11:39:11 -0400 (EDT) From: Gaspar Bakos To: Barry <[EMAIL PROTECTED]> Subject: Re: my-huge.cnf quite outdated Hello, Barry, RE: > Guess we would answer to everyone on the list who wishes to optimize his > cnf. I don&

Re: example when indexing hurts simple select?

2006-06-11 Thread Gaspar Bakos
Hi, RE: > Have you tried > analyze table x; This was quick: mysql> analyze table TEST; Table Op Msg_typeMsg_text CAT.TEST analyze status Table is already up to date -- mysql> show index from TEST; +---+++

Re: example when indexing hurts simple select?

2006-06-11 Thread Gaspar Bakos
Hi, Philip, RE: > What is the EXPLAIN output of each? OK, first I naively typed: explain create table test2 select * from TEST where MMi < 9000; but of course, this does not work. The simple select that uses MMi_m as index (and takes up to an hour): mysql> explain select * from TEST where MMi_m

example when indexing hurts simple select?

2006-06-11 Thread Gaspar Bakos
Hello, There is a table (TEST) with ~100 million records, 70 columns (mostly integers, some doubles, and a few short fixed char()), and has a ~100Gb size. The table has a single (not unique) index on one integer column: MMi. If I invoke a simple select based on MMi, then the selection is VERY sl

Re: my-huge.cnf quite outdated

2006-06-11 Thread Gaspar Bakos
Hi, Keith, RE: > This seems to be the way things are with mysql nowdays. > Is it not time for the developers to take a serious look > into culling all the outdated and multiple ways of > accomplishing the same thing from mysql and the > documentation? This is a somewhat different subject. But you

my-huge.cnf quite outdated

2006-06-10 Thread Gaspar Bakos
Hi, Isn't the my-huge.cnf in the MySQL 5.0.22 distribution quite outdated? It says "for systems with 512Mb RAM or more". Nowdays this is pretty basic setup, and 'huge' is probably something in excess of 4Gb RAM. I wonder if anyone has a recommendation for truly huge systems. For example a dual CP

Re: dropping primary key - 99%CPU

2006-06-10 Thread Gaspar Bakos
Hi, Dan, RE: > Currently mysql handles all "ALTER TABLE" commands by rebuilding the > entire table and all indexes. OK, so an "add index" is mapped to "alter table", and the "alter table" rebuilds everything. This means if I have a table with multiple indexes, it does not make too much sense to

dropping primary key - 99%CPU

2006-06-10 Thread Gaspar Bakos
Hi, Could someone explain why dropping a primary key of a table (of ~1million rec) may take up to minutes of time and 99%CPU? Naively, I would have thought that this involves only updating the index file. However, all the .MYD, MYI and .frm files are duplicated (#sql-*), and then something happe

.TMD files

2006-06-09 Thread Gaspar Bakos
Hello, Can someone point me to the docs that explain what the .TMD files are? We are using MySQL 5.0.22 under RH FC3. We have a massive table of the size ~100Gb. It already has a couple of indexes. We are adding a new index on the first 8 character of a column: alter table CAT add index(des(8))

building index table, duplicate .MYD

2006-06-07 Thread Gaspar Bakos
Hi, I wonder if anyone could explain the rational behind the following: (MySQL-5.0.22) We have a MyISam table with ~100Gb size. We start creating an index. The procedure starts making temporary files: -rw-rw 1 mysql mysql11430 Jun 7 10:27 #sql-79d6_cc.frm -rw-rw 1 mysql mysql

Re: procedure analyse() returns bad type?

2006-06-06 Thread Gaspar Bakos
Hi, Jeremy, RE: > Looks like a bug. The code in question is: > > >if (num_info.dval > -FLT_MAX && num_info.dval < FLT_MAX) > sprintf(buff, "FLOAT(%d,%d)", num_info.integers, > num_info.decimals); >else > sprintf(buff, "DOUBLE(%d,%d)", num_info.integers, > n

procedure analyse() returns bad type?

2006-06-02 Thread Gaspar Bakos
Hi, The following command returns recommended type FLOAT(3,6) for a double(10,6) column: mysql CAT -t -u catadmin -p -e \ "select * from temp procedure analyse(16,8192)" > temp.log Optimal_fieldtype = FLOAT(3,6) NOT NULL. The trouble is that FLOAT(3,6) does not make sense, with FLOAT(M,

char(17) vs. char(18)

2006-06-01 Thread Gaspar Bakos
Hi, Do you think there is any difference in the speed of select() statements done on a big table depending on whether one of the columns of this table is defined as char(17) or char(18)? That is, will the select speed depend on the parity of the number of chars? More generally, are char(2^n) widt

auto_increm, forced step back

2005-02-15 Thread Gaspar Bakos
Hi, My understanding is that with mysql >= 3.23 versions the last value of an auto_increm column is stored, thus even if records are deleted, when a new one is inserted (as NULL), values will not be re-used. This is a fine attribute, but is there any way to override it? That is, to bump back the c

RE: move column position

2004-12-30 Thread Gaspar Bakos
Hi, RE: > I believe this is what you are looking for: > ALTER TABLE Images MODIFY Imcreatedat datetime NOT NULL default '-00-00 > 00:00:00' AFTER Imccdtemp; Thanks, Tom for the clue. Yes, this is what I tried, but it did not work. Seems like modify does not accept the "AFTER" part. I tried

move column position

2004-12-29 Thread Gaspar Bakos
Hi, Is there a solution for "moving" a column in a table from a position to another? I tried various "alter table" configurations. The only solution i found was (trying to "move" IMcreatedat): # Add temporary column: Alter table Images add column temp datetime NOT NULL default '-00-00 0

create ... select fails

2004-12-29 Thread Gaspar Bakos
Hi, I am trying to making a copy of a table called "Sections" into a new table (just to be created) called "CamCfgSec". This "CamCfgSec" has different column names (but represent the same data, and in the same column order). I tried to achieve this with the create table ... select syntax,

Re: unique key <-> primary key

2004-12-28 Thread Gaspar Bakos
Hi, RE: > And columns in primary keys must be NOT NULL. Columns in unique > keys can be NULL (if they are NOT NULL, then the unique key is > functionally the same as a primary key). OK, thanks guys for the explanation. Then the result of mysqldump table definition part: UNIQUE KEY HONstid (HON

unique key <-> primary key

2004-12-28 Thread Gaspar Bakos
Hi, I have two tables, seemigly very similar setup; the primary key is the combination of two columns. With mysqldump, however, the table definition of the two tables looks different. Mysqldump on table 1 says ... UNIQUE KEY HONstid (HONstid,HONname) whereas on table 2 it says ...

create "set" column with possible values 1 to 64

2004-12-27 Thread Gaspar Bakos
Hi, Is there any elegant way of saying the following statement in a shorter format: create table dummy ( col1 set(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,..64) ); That is, I would use all the 64 possible values that are offered by the "SET" column structure, and I am lazy to writ

insert into table select ...

2004-05-18 Thread Gaspar Bakos
Hi, I am trying to duplicate a row of a table in the following way: insert into Observer select * from Observer where OBid = 4; ERROR 1066: Not unique table/alias: 'Observer' It is a unique table; I mean there can't be another table named in the same way. Any pointer would be welcome. Probably

Re: How to include count(*) in selection criteria

2003-12-17 Thread Gaspar Bakos
Hi, RE: > In other words, you cannot use values that are determined from > the selected rows to determine which rows to select. :-) Sounds very logical. In fact I was not surprised that my query did not work, I just had no idea about the workaround. Thanks again! Gaspar -- MySQL General Maili

How to include count(*) in selection criteria

2003-12-17 Thread Gaspar Bakos
Dear all, I am trying the following mysql statement (probably it will be obvious that I am a newcomer): select IMdirectory, IMljd, count(*) as N from Images where IMstid = 5, N > 10 group by IMdirectory order by IMljd; ERROR 1054: Unknown column 'N' in 'where clause' My question is: how could I

Re: Master/Master Asynchronous replication

2003-07-28 Thread Gaspar Bakos
Hi, Joe, I have exactly the same scenario. Did you get any valuable response you could share with me? I haven't seen any on the list. In fact, my case is slightly more complicated; I have "N" computers, all having their local databases, and have an additional computer, which I call the "central"

high availability sync of 3 hosts

2003-07-18 Thread Gaspar Bakos
Hello, I am trying to find a solution for the following scenario. The topic is replication/high-availability/redundancy and sync. I have three computers, A, B and C. "A" and "B" are operating important hardware (astronomical telescopes TEL_A and TEL_B), and the operation parameters as well as log