Re: Performance difference? : [SELECT ON Merge TableAB] vs [(SELECT ON Table A) UNION (SELECT ON TABLE B) ]

2005-07-18 Thread Gleb Paharenko
Hello. I've searched in the archives at: http://lists.mysql.com/mysql but the only thing I've found is that the speed difference is rather low. In my opinion, using UNION is a more flexible solution. pow <[EMAIL PROTECTED]> wrote: > Hi everyone, > Take for example two identic

Performance difference? : [SELECT ON Merge TableAB] vs [(SELECT ON Table A) UNION (SELECT ON TABLE B) ]

2005-07-17 Thread pow
Hi everyone, Take for example two identical tables A & B, and a MERGE table merging both of them. Would there be any performance advantage if I do a select (with a where criteria on an indexed column) on the MERGE table, as opposed to doing a union of two selects with the same WHERE criteria?

Re: INSERT INTO tbl (SELECT) UNION (SELECT) ORDER BY field-does not work. Why?

2003-12-02 Thread Sergei Golubchik
Hi! On Dec 02, George Georgeus wrote: > Hi! > I do not know how to use INSERT and UNION together. > For example: > INSERT INTO tmp_table_name (a) > (SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY > a LIMIT 10) > UNION > (SELECT a FROM table_name WHERE a=11 AND B

RE: INSERT INTO tbl (SELECT) UNION (SELECT) ORDER BY field-does not work. Why?

2003-12-02 Thread Wouter van Vliet
George Georgeus wrote: > Hi! > I do not know how to use INSERT and UNION together. > For example: > INSERT INTO tmp_table_name (a) > (SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY a LIMIT > 10) UNION (SELECT a FROM table_name WHERE a=11 AND B=2 ORDER > BY a LIMIT 10) OR

INSERT INTO tbl (SELECT) UNION (SELECT) ORDER BY field-does not work. Why?

2003-12-02 Thread George Georgeus
Hi! I do not know how to use INSERT and UNION together. For example: INSERT INTO tmp_table_name (a) (SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY a LIMIT 10) UNION (SELECT a FROM table_name WHERE a=11 AND B=2 ORDER BY a LIMIT 10) ORDER BY a; It does not work. But I think it should. Have

SUMmarizing/GROUPing over UNION SELECT?

2003-11-04 Thread Ivo
Is it possible to summarize and group over a result set derived from several different tables using UNION SELECT? For example, this is what I have: Table1.field1 1 2 3 4 5 5 Table2.field1 1 2 3 3 And what I want to get is something like this: 1) SUM=29 2) A result set like this by grouping

Re: SELECT....UNION SELECT.....

2002-11-12 Thread Rafal Jank
t; > You have written the following: > > > " > > SELECT SalesID, CustID, Done AS Status, TimeStamp > > FROM Appointment > > Where Done='Not Yet' > > UNION > > SELECT SalesID, CustID, Report AS Status, TimeStamp > > FROM SalesReport &

SELECT....UNION SELECT.....

2002-11-12 Thread Prabu Subroto
Hallo my friends I am writing a database application program with PHP and MySQL. I have two tables that I want to query in the same time with "SELECT...UNION SELECT ..." syntax. Too many errors encountered; the rest of the message is ignored: The 2 tables are APPOINTMENT table

Re: union select

2001-01-21 Thread Bob Hall
>Hello! >My company curently use microsoft SQL, we discover the MySQL database few >weeks ago and we really impressed, but i have a few problems becouse my >querys use the union select which is not acceptet by MySQL, for example: Sir, it would be a bad idea to continue trying to conv

RE: union select

2001-01-21 Thread Carsten H. Pedersen
> Hello! > My company curently use microsoft SQL, we discover the MySQL database few > weeks ago and we really impressed YES! Another convert! :-) > , but i have a few problems becouse my > querys use the union select which is not acceptet by MySQL, for example: Bob Hall has a

union select

2001-01-21 Thread Nir Oren
Hello! My company curently use microsoft SQL, we discover the MySQL database few weeks ago and we really impressed, but i have a few problems becouse my querys use the union select which is not acceptet by MySQL, for example: SELECT DATE_FORMAT(min(time_stamp),'