Re: select unique ? (solved thankyou :))

2008-02-16 Thread Richard
Price, Randall a écrit : Since both of these work, I was wondering which one would be faster. Here is an EXPLAIN on a similar test I did on one of my test tables. (NO index on field1, WinXP, MySQL 5.0.41-community-nt, SQLyog query window) SELECT COUNT(*) FROM tblClients (1660 row(s)

Re: select unique ?

2008-02-16 Thread Baron Schwartz
Hi, On Feb 15, 2008 10:26 AM, Price, Randall [EMAIL PROTECTED] wrote: Since both of these work, I was wondering which one would be faster. Here is an EXPLAIN on a similar test I did on one of my test tables. (NO index on field1, WinXP, MySQL 5.0.41-community-nt, SQLyog query window)

select with table name

2008-02-16 Thread Miguel Vaz
Hi, I have a small issue that i can get my head around to solve: Is it possible to do a select from two tables using a union all (select * from t1 union all select * from t2), and have it display the table name in front of each row? What i need is, on the big resulting

Re: select with table name

2008-02-16 Thread Paul DuBois
At 12:04 AM + 2/17/08, Miguel Vaz wrote: Hi, I have a small issue that i can get my head around to solve: Is it possible to do a select from two tables using a union all (select * from t1 union all select * from t2), and have it display the table name in front of each

MYSQL Limit

2008-02-16 Thread Santosh Killedar
I have a MYsql table with following columns Node ID, Comment ID, Text, Date. Coment ID is primary key. For each Node ID there are one or more comment IDs (comments). There is a threshold (max_comments) that a node can have. How can I delete oldest comments associated with those nodes where this

triggers sintax error with IF

2008-02-16 Thread Nacho Garcia
Hi, im struggling with triggers but i can make this works because of bad sintax, i hope someone can give me a hand CREATE TRIGGER trigger_actualize AFTER INSERT ON usuarios_imgvid FOR EACH ROW IF NEW.type=IMG THEN UPDATE users_status E SET images=images+1 WHERE E.id_usr =

Re: triggers sintax error with IF

2008-02-16 Thread Paul DuBois
Hi, im struggling with triggers but i can make this works because of bad sintax, i hope someone can give me a hand CREATE TRIGGER trigger_actualize AFTER INSERT ON usuarios_imgvid FOR EACH ROW IF NEW.type=IMG THEN UPDATE users_status E SET images=images+1 WHERE E.id_usr =

Is mysql_upgrade *required*?

2008-02-16 Thread Hayden Livingston
We're trying to upgrade from 4.1.20 to 5.0.54. The problem is running mysql_upgrade. It's turning out to be that about 70% of our tables (over 800GB) are being needing repair. The question is, will it be possible to get by without upgrading? Eventually we'll get to it, but will data be served

Re: Is mysql_upgrade *required*?

2008-02-16 Thread Paul DuBois
At 9:01 PM -0600 2/16/08, Hayden Livingston wrote: We're trying to upgrade from 4.1.20 to 5.0.54. The problem is running mysql_upgrade. It's turning out to be that about 70% of our tables (over 800GB) are being needing repair. The question is, will it be possible to get by without upgrading?

Re: Is mysql_upgrade *required*?

2008-02-16 Thread Hayden Livingston
Ahh yes, but I canceled it before all the tables/databases were checked. But I guess, you're saying, it'll work but, I might get bad results. How when you mean certain queries, is there like some type? scans? or the ones that key off that index? or a subset of them? Thanks! On Feb 16, 2008 9:09

Re: Is mysql_upgrade *required*?

2008-02-16 Thread Paul DuBois
At 9:12 PM -0600 2/16/08, Hayden Livingston wrote: Ahh yes, but I canceled it before all the tables/databases were checked. But I guess, you're saying, it'll work but, I might get bad results. How when you mean certain queries, is there like some type? scans? or the ones that key off that index?

Re: Is mysql_upgrade *required*?

2008-02-16 Thread Hayden Livingston
Right, I read the manual, and I'm trying to wonder what that really means? However, I ran mysql_upgrade, for a few seconds, and then got a couple of tables as needing repair, so I checked their SQL creation, and none of them had TEXT indexes, but did have a TEXT column. How do we know what the

RE: MYSQL Limit

2008-02-16 Thread Santosh Killedar
Wow !! Thank you. I was not aware of this construct and seems to be on the right path. Just noticed a few thing as the query below was returning 0 records. 1. Shouldn't the last line be (@last @keeplast) 2. If the above 1 is correct, Where the @last should get set to zero again? For some

Access Full-Text index

2008-02-16 Thread Haitham Kaddoura
Hi All, is there a clever way to access the full-text index... I want to know what the the words that has been indexed... Many thanks :) Regards, HK

Circular Replication flawed?

2008-02-16 Thread Hayden Livingston
I was reading the circular replication post on Onlamp.com, how they achieve this master-master configuration. I was wondering if this will always work out in a scenario. For example: auto_increment_increment = 10 auto_increment_offset = 1 (for NodeA), and 2 for (NodeB) Node1 starts at time A, 5

RE: select with table name

2008-02-16 Thread roger.maynard
Can you just do SELECT t1.*, t1 as tablename FROM t1 UNION SELECT t2.*, t2 as tablename FROM t2 Roger -Original Message- From: Miguel Vaz [mailto:[EMAIL PROTECTED] Sent: 17 February 2008 00:04 To: mysql@lists.mysql.com Subject: select with table name Hi, I have a