Re: db/query question...

2007-01-04 Thread ViSolve DB Team
Hi, This will do: select name,status, max(_date) from dog where status <(select max(status) from dog where status=dog.status) group by name; Thanks ViSolve DB Team. - Original Message - From: "bruce" <[EMAIL PROTECTED]> To: Sent: Friday, January 05, 2007 10:23 AM Subject: db/query

Re: mysql data into CSV file.

2007-01-04 Thread ViSolve DB Team
Hi, Try using, SELECT * INTO OUTFILE 'tmp/music_mp3.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ' " ' LINES TERMINATED BY ' \n ' FROM mp3; Thanks ViSolve DB Team - Original Message - From: "Shain Lee" <[EMAIL PROTECTED]> To: "MySql" Sent: Friday, January 05, 2007 11:05 AM S

Fwd: mysql data into CSV file.

2007-01-04 Thread Jake Peavy
-- Forwarded message -- From: Jake Peavy <[EMAIL PROTECTED]> Date: Jan 4, 2007 10:48 PM Subject: Re: mysql data into CSV file. To: Shain Lee <[EMAIL PROTECTED]> On 1/4/07, Shain Lee <[EMAIL PROTECTED]> wrote: I wanted to get that info which has stored in relavent fields into a C

Re: mysql question regarding distinct/group by...

2007-01-04 Thread Arun Kumar PG
SELECT * FROM Dog GROUP BY FooId HAVING FooId = 1; This should also work. On 1/5/07, ViSolve DB Team <[EMAIL PROTECTED]> wrote: Hi, > dog > fooID int > size int > id int > > dog > fooIDsizeid >1 2 1 >2 5 2 >1 5 3 > > if i do a query > sel

mysql data into CSV file.

2007-01-04 Thread Shain Lee
Hi For example , suppose i have a database - Music, and a table in it is mp3. under mp3 there is more fields , like, id, artist, name , mp3_file...etc. I wanted to get that info which has stored in relavent fields into a CSV fle . Can somebody help me to do that please ? Can i do it mysql co

Re: InnoDB vs MyISAM

2007-01-04 Thread mos
At 08:38 AM 1/4/2007, you wrote: Hi, I have seen that by default some tables are created as InnoDB and some as MyISAM. I guess the table type is not chosen randomly. How is it chosen the table engine used? And is InnoDB recommended now? If you need transactions or RI. Does it support f

db/query question...

2007-01-04 Thread bruce
hi... a further test... the following test tbl/information: dog name char statusint _date timestamp idint test data dog name status _dateid tom 1 01/20/07 1 tom 2 01/21/07 2 sue 1

db/query question...

2007-01-04 Thread bruce
hi... a further test... the following test tbl/information: dog name char statusint _date timestamp idint test data dog name status _dateid tom 1 01/20/07 1 tom 2 01/21/07 2 sue 1

Re: mysql question regarding distinct/group by...

2007-01-04 Thread ViSolve DB Team
Hi, dog fooID int size int id int dog fooIDsizeid 1 2 1 2 5 2 1 5 3 if i do a query select * from dog where fooID='1'; i get 1,2,1 1,5,3 Try, select * from dog where fooID=1 group by fooID; - which retrieves the first instance; resulti

Re: Err1114 The table 'sbtest' is full

2007-01-04 Thread ViSolve DB Team
Hi, 1. The table full error was due to temporary table size being large, which is created during transaction processing. Try setting SQL_BIG_TABLES, to avoid over-allocating memories for other queries. 2. Since Innodb engine, the innodb tablespace might run out of space. Try to increase th

Re: Deleting Foreign Key

2007-01-04 Thread Mungbeans
Chris White-4 wrote: > > Moving along... what I do first is SHOW > CREATE TABLE `table_name`: > ...snipped... > So, first you remove the key: > ALTER TABLE table_name DROP KEY `key_column`; > then the foreign key: > ALTER TABLE table_name DROP FOREIGN KEY `table_name_ibfk_1`; > ...snipped...

query question...

2007-01-04 Thread bruce
hi... continuing with my test (i was able to get the correct information earlier.. thanks to all who helped!) i have the following test tbl/information: dog name char statusint _date timestamp idint test data dog name status _dateid tom

Re: 5.1.14-beta with ssl build failure

2007-01-04 Thread Chris White
Duncan Hutty wrote: I attempted to build 5.1.14-beta with ssl support and it failed (output below). It builds quite happily on this system without the ssl support parameter to configure. Since it appears to fail in an area (timezone system) that to me seems rather unrelated, I wondered if som

Re: How scaleable is MySQL 5's Innodb with multi-core CPU's?

2007-01-04 Thread Sid Lane
what do you consider a high number of updates/sec? I'm the DBA for a popular website in that league (well, maybe not google or yahoo but certainly ticketmaster) and we average ~210 DMLs/sec with peaks in excess of 1,000. we use a mixture of myisam for static (or infrequently updated) reference t

5.1.14-beta with ssl build failure

2007-01-04 Thread Duncan Hutty
I attempted to build 5.1.14-beta with ssl support and it failed (output below). It builds quite happily on this system without the ssl support parameter to configure. Since it appears to fail in an area (timezone system) that to me seems rather unrelated, I wondered if something odd was afoot.

Re: Global Unique Identifiers

2007-01-04 Thread David T. Ashley
On 1/4/07, Daniel Kiss <[EMAIL PROTECTED]> wrote: Hi All, I'm designing a database where it is required for each row in a table to have a unique identifier accross a bunch of running MySQL servers on a network. I'm considering two options: 1. Have a two-column primary key, where the first co

RE: group by/select issue..

2007-01-04 Thread ddevaudreuil
select s1.universityID, s1.actionID, ut.svn_dir_name (or other columns of your choice) from from SvnTBL as s1 inner join universityTBL ut on s1.univeristyID=ut.ID left outer join (select universityID from SvnTBL where actionID =3) as s2 ON s1.universityID=s2.universityID where s2.universi

RE: Error: Duplicate entry 'xxxx-L' for key 6

2007-01-04 Thread afan
This is structure of the table before I "fixed". CREATE TABLE `products` ( `prod_id` int(8) unsigned NOT NULL auto_increment, `prod_no` varchar(50) NOT NULL default '', `prod_name` varchar(255) NOT NULL default '', `prod_description` text, `prod_colors` text, `prod_includes` text, `p

RE: group by/select issue..

2007-01-04 Thread bruce
thanks for the derived tbl approach. it solved my 1st problem/issue. the final query that i used is: select distinct s1.universityID from SvnTBL as s1 left outer join (select universityID from SvnTBL where actionID =3) as s2 ON s1.universityID=s2.universityID where s2.universityID is nul

RE: Fulltext problem

2007-01-04 Thread Rick James
With so few rows, are you hitting the 50% rule? Try again with a decent number of rows. > -Original Message- > From: devy [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 04, 2007 5:46 AM > To: mysql@lists.mysql.com; [EMAIL PROTECTED] > Subject: Fulltext problem > > Hi, > today I've

RE: group by/select issue..

2007-01-04 Thread ddevaudreuil
Use a derived table (untested query): select distinct universityID from SvnTBL s1 left outer join (select universityID from SvnTBL where actionID =3) as s2 ON s1.universityID=s2.universityID where s2.university ID is NULL I'm not sure if derived tables are in all versions of MySQL, I

RE: group by/select issue..

2007-01-04 Thread bruce
hi peter i must be missing something. the following is my actual schema. i have a test tbl with ~2900 rows... only a few of the rows have an actionID=3. each universityID can have multiple actionIDs mysql> describe SvnTBL; +--+--+--+-++-

Re: group by/select issue..

2007-01-04 Thread Peter Bradley
Bruce, Try: SELECT DISTINCT NAME FROM DOG WHERE STATUS != 3 Should do the trick. You obviously don't want the STATUS field. If you include it, you'll get more than one line per name. Similarly for ID. If you want to include the STATUS or ID fields, then you obviously want more than one

RE: Error: Duplicate entry 'xxxx-L' for key 6

2007-01-04 Thread Imran Chaudhry
Key 6 relates to the 6th key, or index, in the CREATE TABLE statement for this table: >> PRIMARY KEY (`prod_id`), >> UNIQUE KEY `prod_no` (`prod_no`), >> KEY `products_index1` (`prod_status`), >> KEY `products_index2` (`prod_start_date`,`prod_end_date`), >> KEY `on_sale` (`on_sale`),

RE: group by/select issue..

2007-01-04 Thread bruce
hi chris... your query, >>SELECT name FROM dog WHERE status = 3 GROUP BY name<< will actually give the items where status=3 however, i can't get the resulting issues by doing 'status!=3', because the tbl has multiple status for a given name, so the query will still return the other status that

Re: group by/select issue..

2007-01-04 Thread Chris White
bruce wrote: i'm trying to figure out how to create a select query that groups the tbl around 'name' such that if i want all names that do not have a status=3, i'd get a single row for 'sue' and 'bob' I'm not sure why `SELECT name FROM dog WHERE status = 3 GROUP BY name;` wouldn't give you wha

group by/select issue..

2007-01-04 Thread bruce
hi... i have the following test tbl dog name char statusint idint test data dog name status id tom 1 1 tom 2 2 sue 1 3 tom 3 4 sue 2 5 bob 1 6 i'm trying

Re: InnoDB vs MyISAM

2007-01-04 Thread Juan Eduardo Moreno
Octavian, 1) You can use MyISAM for example when you use static information in a webpage. For example, only for store information of customers, something like that.. 2) Innodb is a engine that support ACID, you can use for transactions. For example, load information of sales from PDA ( field)

Re: InnoDB vs MyISAM

2007-01-04 Thread Octavian Rasnita
And is InnoDB recommended now? It depends.. :) Depends on... what? I mean, if I don't need transactions, is there another reason for using InnoDB? If it is necessary I can build the client program without foreign keys support also. Thanks. Octavian -- MySQL General Mailing List For li

Re: Deleting Foreign Key

2007-01-04 Thread Chris White
Mungbeans wrote: ALTER TABLE `mytable` DROP FOREIGN KEY `keyname` #1025 - Error on rename of '.\database\mytable' to '.\database\#sql2-6ec-11' (errno: 152) ALTER TABLE `mytable` DROP INDEX `keyname` #1025 - Error on rename of '.\database\#sql-6ec_13' to '.\database\mytable' (errno: 150 Oh t

re: Fulltext problem

2007-01-04 Thread J.R. Bullington
Hi Devy -- There are a couple of issues with your query below, and hopefully we can help you figure it out. First off, your table and query structure are fine. However, one can ask why not use a TINYTEXT or even a TEXT field instead of VARCHAR(255). It's all in the memory overhead. =) Moving

RE: InnoDB vs MyISAM

2007-01-04 Thread Jerry Schwartz
InnoDB supports foreign keys, MyISAM does not. MyISAM supports full text indices, InnoDB does not. This is unfortunate. It has kept me using MyISAM where I'd rather use InnoDB, although fortunately none of my applications are really hampered by it. The only work-around I can think of is to creat

Re: InnoDB vs MyISAM

2007-01-04 Thread Christian Hammers
On 2007-01-04 Octavian Rasnita wrote: > I have seen that by default some tables are created as InnoDB and some as > MyISAM. > > I guess the table type is not chosen randomly. How is it chosen the table > engine used? You can set a global and IIRC a database specific default for the database typ

InnoDB vs MyISAM

2007-01-04 Thread Octavian Rasnita
Hi, I have seen that by default some tables are created as InnoDB and some as MyISAM. I guess the table type is not chosen randomly. How is it chosen the table engine used? And is InnoDB recommended now? Does it support full text indexes? Or if not, is there a way of using full text index

Re: Fulltext problem

2007-01-04 Thread Mark Leith
devy wrote: ---cut--- - insert into ft_test (field1,field2,field3) VALUES('mysql full text', 'this is a test', 'mysql fulltext'); - the problem is that when I execute this query I always get 0 as relevance: ---cut--- A FULLTEXT search will not match return val

Re: Deleting Foreign Key

2007-01-04 Thread Heikki Tuuri
Mungbeans, I do not understand how you get error 152 from the ALTER. ./include/my_base.h:355:#define HA_ERR_ROW_IS_REFERENCED 152 Please print SHOW INNODB STATUS\G after you get that error. Best regards, Heikki Oracle Corp./Innobase Oy InnoDB - transactions, row level locking, and foreign key

Global Unique Identifiers

2007-01-04 Thread Daniel Kiss
Hi All, I'm designing a database where it is required for each row in a table to have a unique identifier accross a bunch of running MySQL servers on a network. I'm considering two options: 1. Have a two-column primary key, where the first column is a normal auto incremented ID field, the

Fulltext problem

2007-01-04 Thread devy
Hi, today I've experienced a problem that I don't understand and I can't solve! I've created a table as follows: --- CREATE TABLE `ft_test` ( `id` int(11) NOT NULL auto_increment, `field1` varchar(255) NOT NULL , `field2` varchar(255) NOT NULL , `field3` text NOT NULL, PRIMARY KEY (`i