Re: Multi select Query help...

2012-03-03 Thread Hal�sz S�ndor
2012/03/01 19:56 -0800, Don Wieland I do not get the same results. Am I missing something? Hopefully something simple ;-) O, you are. You do not want GROUP_CONCAT in the subquery. It gives you the comma-separated string whereto you referred, which, as far as the IN goes, is only one string

Multi select Query help...

2012-03-01 Thread Don Wieland
Appreciate a little guidance here: Background: I have an invoicing system. Invoices are generated and (invoice and Invoice Items) and Payments are generated (Payments and Payment Items). Payment items are amount of the Payment Total allocated to payoff open invoices. So I may have 3 open

Script to mail output of select query

2011-03-15 Thread Adarsh Sharma
Dear all, I have prepared a simple script that shows the database, tables size in the Database server as :- Please check the attachment for the script output. Now I just want to mail the output of my script to some persons e-mail-ID Also, I want to do some calculations and provide the

Re: Script to mail output of select query

2011-03-15 Thread Johan De Meersman
- Original Message - From: Adarsh Sharma adarsh.sha...@orkash.com Please check the attachment for the script output. Thanks for your password :-) Now I just want to mail the output of my script to some persons e-mail-ID Assuming you run this from crontab, just set

Re: Complex Select Query

2010-08-25 Thread Ashish Mukherjee
@lists.mysql.com Subject: Complex Select Query Hi; I have the following query: select * from spreadsheets s join products p on p.Item=s.Item join categories c on p.Category=c.ID where s.Client=%s order by p.category, c.parent; mysql describe products

Complex Select Query

2010-08-24 Thread Victor Subervi
Hi; I have the following query: select * from spreadsheets s join products p on p.Item=s.Item join categories c on p.Category=c.ID where s.Client=%s order by p.category, c.parent; mysql describe products; +-+--+--+-+-++ | Field | Type

Re: Complex Select Query

2010-08-24 Thread Peter Brawley
://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html and http://www.artfulsoftware.com/infotree/treequeryperformance.pdf. PB - -Original Message- From: Victor Subervi victorsube...@gmail.com Sent: Aug 24, 2010 1:14 PM To: mysql@lists.mysql.com Subject: Complex Select Query

Re: Complex Select Query

2010-08-24 Thread Victor Subervi
: Victor Subervi victorsube...@gmail.com Sent: Aug 24, 2010 1:14 PM To: mysql@lists.mysql.com Subject: Complex Select Query Hi; I have the following query: select * from spreadsheets s join products p on p.Item=s.Item join categories c on p.Category=c.ID where s.Client=%s order by p.category

SELECT query question

2009-07-27 Thread Rytsareva, Inna (I)
Hello. I have 4 tables: MainTable (Main_ID, Main_Name) Table1 (Source1_ID, Source1_Name, Main_ID) Table2 (Source2_ID, Source2_Name, Main_ID) Table3 (Source3_ID, Source3_Name, Main_ID) And a search box. A user can type any names from Source1_Name or Source2_Name or Source3_Name. I need to get

Re: SELECT query question

2009-07-27 Thread Jo�o C�ndido de Souza Neto
select * from MainTable MT left join Table1 T1 on MT.Main_ID = T1.MainID left join Table2 T2 on MT.Main_ID = T2.MainID left join Table3 T3 on MT.Main_ID = T3.MainID where T1.Source1_Name = anything or T2.Source2_Name = anything or T3.Source3_Name = anything Not tested. --

RE: SELECT query question

2009-07-27 Thread Gavin Towey
...@consultorweb.cnt.br] Sent: Monday, July 27, 2009 1:09 PM To: mysql@lists.mysql.com Subject: Re: SELECT query question select * from MainTable MT left join Table1 T1 on MT.Main_ID = T1.MainID left join Table2 T2 on MT.Main_ID = T2.MainID left join Table3 T3 on MT.Main_ID = T3.MainID where

Re: SELECT query question

2009-07-27 Thread Jo�o C�ndido de Souza Neto
Table2 WHERE Source2_Name = 'name' UNION SELECT Main_ID FROM Table3 WHERE Source3_Name = 'name' -Original Message- From: João Cândido de Souza Neto [mailto:j...@consultorweb.cnt.br] Sent: Monday, July 27, 2009 1:09 PM To: mysql@lists.mysql.com Subject: Re: SELECT query question select

Re: mysql select query

2009-07-13 Thread Johnny Withers
Can you show the CREATE TABLE for your REF_SEQ table? The explain output says using where which means that MySQL will have to post-filter rows after the storage engine retrieves them. It also means the query may benefit from different/better indexing. On Mon, Jul 13, 2009 at 12:04 AM, TianJing

Re: mysql select query

2009-07-13 Thread TianJing
the REF_SEQ is defined below, the col DNA_SEQ is a string such as ATGCGGTTA, | REF_SEQ | CREATE TABLE `REF_SEQ` ( `SEQ_ID` int(11) NOT NULL auto_increment, `REF_ID` int(11) NOT NULL, `START_POSITION` int(11) NOT NULL, `END_POSITION` int(11) NOT NULL, `DNA_SEQ` text, `DNA_QUALITY`

Re: mysql select query

2009-07-13 Thread Johnny Withers
I see that index_ref_start is defined on Ref_Id and Start_Position. Mysql only uses the left-most column of this index. Drop and re-add this key only defined as INDEX idx_ref_start(start_position) and see if that helps. Your explain you sent this time is not even using the index. In your

Re: mysql select query

2009-07-13 Thread TianJing
sorry for my careless,the sql should be select * from REF_SEQ where REF_ID = 3 and START_POSITION between 3 and 803; the explain output is : mysql explain select * from REF_SEQ where REF_ID = 3 and START_POSITION between 3 and 803;

Re: mysql select query

2009-07-13 Thread Johnny Withers
It looks like MySQL is using both columns in the key for that query, since the key_len is 8, but for some reason it says it is still using where. What happens when you only select these fields: seq_id, ref_id, start_position, end_position? Does the query speed up? I had a table that had some

Re: mysql select query

2009-07-13 Thread TianJing
yes,it is more faster that i select every cols except the TEXT col,but unfortunately i need the TEXT cols for next step. 2009/7/14 Johnny Withers joh...@pixelated.net It looks like MySQL is using both columns in the key for that query, since the key_len is 8, but for some reason it says it is

mysql select query

2009-07-12 Thread JingTian
Hi all, i use select * from table_name where start_postion between min_postion and max_postion to select all the record in the ranges, when the ranges is very large,such as 800(about 1000 record in it), the query is so slow, when i use mysql administrator i find that traffic is higher when

Re: mysql select query

2009-07-12 Thread Darryle Steplight
1. Don't use SELECT *. Only grab the cols that you only need. Also make sure you have an index on min_position and max_position. After that if your query isn't faster please show us the output of running EXPLAIN select * from table_name where start_postion between min_postion and max_postion .

Re: mysql select query

2009-07-12 Thread TianJing
thanks for reply, i hava an index on the start_position,the min_postion and the max_postion is constant value, the output of the query is: explain select * from REF_SEQ where START_POSITION between 3 and 803;

Re: mysql select query

2009-07-12 Thread Darryle Steplight
You are still doing SELECT * . Do you really need to return all of the columns in that table or just COL1, COL2, COL5 for example. Only grab the columns you are actually going to use. On Mon, Jul 13, 2009 at 12:23 AM, TianJingtianj...@genomics.org.cn wrote: thanks for reply, i hava an index on

Re: mysql select query

2009-07-12 Thread TianJing
sorry fo that, but i really need all cols in the table, i think the problem maybe caused by one of the col which is text type, each record of this col has 2000 characters. this makes the size of record more biger. 2009/7/13 Darryle Steplight dstepli...@gmail.com You are still doing SELECT * .

Re: mysql select query

2009-07-12 Thread Darryle Steplight
Numeric indexing is a lot faster. You definitely shouldn't use text or varchar types as column types for you min and max values. Do an ALTER TABLE on any column only hold numeric values and switch them to int or mediumint. On Mon, Jul 13, 2009 at 12:36 AM, TianJingtianj...@genomics.org.cn

Re: mysql select query

2009-07-12 Thread TianJing
i do not use text for start_postion,i use int for it. the only col which defined to text is characters such as ABTGDSDFSGFDG etc. 2009/7/13 Darryle Steplight dstepli...@gmail.com Numeric indexing is a lot faster. You definitely shouldn't use text or varchar types as column types for you min

Re: If condition in select query / insert /update

2009-05-18 Thread Janek Bogucki
Hi, mysql create table t(i int); mysql insert into t values(1),(2),(3); mysql select i, if(i = 1, 'low', 'high') from t order by i; +--+---+ | i| if(i = 1, 'low', 'high') | +--+---+ |1 | low | |2 | high

Re: If condition in select query / insert /update

2009-05-18 Thread bharani kumar
Can u tell me , assume if i use If in the query , then i reduce performance , Any idea On Mon, May 18, 2009 at 3:19 PM, Janek Bogucki janek.bogu...@studylink.comwrote: Hi, mysql create table t(i int); mysql insert into t values(1),(2),(3); mysql select i, if(i = 1, 'low', 'high') from t

If condition in select query / insert /update

2009-05-17 Thread bharani kumar
Hi all , Can u give one example query , Which contain the IF condition , Because here before am not used the IF and all , Thanks -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyerphp.site88.net/bharanikumar/

Re: Solved Select query locks tables in Innodb

2009-03-25 Thread Carl
problem disappeared and the selects behave as one would expect. Many thanks to all who offered advice. Carl - Original Message - From: Perrin Harkins per...@elem.com To: Carl c...@etrak-plus.com Cc: mysql@lists.mysql.com Sent: Friday, March 13, 2009 1:40 PM Subject: Re: Select query

Negated SELECT query

2009-03-17 Thread BobSharp
3 tables are related by one-many links. Employees Assets Maintenance Employees can be assigned = 0 Assets Assets can have = 0 occurances of Maintenance. Assets table contains EmployeeIDs and MaintenanceIDs, but no Foreign Key contraints. Queries ... 1) which Employees

Re: Negated SELECT query

2009-03-17 Thread Perrin Harkins
On Tue, Mar 17, 2009 at 12:42 PM, BobSharp bobsh...@ntlworld.com wrote: These have been written successfully with Sub-Queries, I would like to know how they can be done with only JOINs  ? http://dev.mysql.com/doc/refman/5.0/en/rewriting-subqueries.html - Perrin -- MySQL General Mailing List

RE: Negated SELECT query

2009-03-17 Thread Bonnett, John
@lists.mysql.com Cc: wi...@lists.mysql.com; mysql-h...@lists.mysql.com Subject: Negated SELECT query 3 tables are related by one-many links. Employees Assets Maintenance Employees can be assigned = 0 Assets Assets can have = 0 occurances of Maintenance. Assets table contains

Re: Negated SELECT query

2009-03-17 Thread BobSharp
, March 17, 2009 10:59 PM Subject: RE: Negated SELECT query SELECT Employees.* FROM Employees LEFT JOIN Assets ON Employess.EmployeeID = Assets.EmployeeID WHERE Assets.EmployeeID IS NULL The one for assets with no maintenance is similar. The point is the left join above produces in its output all

Re: Select query locks tables in Innodb

2009-03-13 Thread Perrin Harkins
concurrency doesn't necessarily mean the older versions that are being read from have to be entirely in memory. InnoDB will lock on a query that doesn't use an index. It shouldn't lock on a SELECT query, regardless of the indexes involved. - Perrin -- MySQL General Mailing List For list

Re: Select query locks tables in Innodb

2009-03-12 Thread Carl
suggestions also. Carl - Original Message - From: Brent Baisley brentt...@gmail.com To: Carl c...@etrak-plus.com Sent: Thursday, March 05, 2009 1:12 PM Subject: Re: Select query locks tables in Innodb Ok, so you have 687 unique organization serial numbers. That's not very unique

Re: Select query locks tables in Innodb

2009-03-12 Thread Brent Baisley
...@etrak-plus.com Sent: Thursday, March 05, 2009 1:12 PM Subject: Re: Select query locks tables in Innodb Ok, so you have 687 unique organization serial numbers. That's not very unique, on average it will only narrow down the table to 1/687 of it's full size. This is probably the source of your

Re: Select query locks tables in Innodb

2009-03-05 Thread Carl
@lists.mysql.com Sent: Wednesday, March 04, 2009 8:11 PM Subject: Re: Select query locks tables in Innodb I don't think it locks the tables. The behavior may be similar, but I seriously doubt that's what's happening. Take a snapshot of SHOW INNODB STATUS while this is going on. And use

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
ba...@xaprb.com To: Brent Baisley brentt...@gmail.com Cc: Carl c...@etrak-plus.com; mysql@lists.mysql.com Sent: Tuesday, March 03, 2009 5:50 PM Subject: Re: Select query locks tables in Innodb On Tue, Mar 3, 2009 at 12:35 PM, Brent Baisley brentt...@gmail.com wrote: A SELECT will/can lock

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
Message - From: Baron Schwartz ba...@xaprb.com To: Brent Baisley brentt...@gmail.com Cc: Carl c...@etrak-plus.com; mysql@lists.mysql.com Sent: Tuesday, March 03, 2009 5:50 PM Subject: Re: Select query locks tables in Innodb On Tue, Mar 3, 2009 at 12:35 PM, Brent Baisley brentt...@gmail.com

Re: Select query locks tables in Innodb

2009-03-04 Thread Perrin Harkins
2009/3/4 Carl c...@etrak-plus.com: However, when I had all the pieces in the query (copy attached), I could easily see it was locking tables using the Server Monitor in Navicat. I don't know what that is, but I think you'd better look at something closer to the bone, like SHOW INNODB STATUS.

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
One more note. Perrin asked if I was using any select... for update. The answer is no, neither in the select query that seems to be locking the tables nor in the queries that are processing transactions. Surprisingly, one of the tables that reports being locked is never accessed

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
the isolation level but I believe it is whatever was set out of the box (five years ago.) Thanks, Carl - Original Message - From: Perrin Harkins per...@elem.com To: Carl c...@etrak-plus.com Cc: mysql@lists.mysql.com Sent: Wednesday, March 04, 2009 1:49 PM Subject: Re: Select query

Re: Select query locks tables in Innodb

2009-03-04 Thread Baron Schwartz
Carl, Locked status in SHOW PROCESSLIST and a table being locked are different. There is a bug in MySQL that shows Locked status for queries accessing InnoDB tables in some cases. What version of MySQL are you using? The table is not really locked, you're just seeing that as a side effect of

Re: Select query locks tables in Innodb

2009-03-04 Thread Baron Schwartz
Carl, Locked status in SHOW PROCESSLIST and a table being locked are different. There is a bug in MySQL that shows Locked status for queries accessing InnoDB tables in some cases. What version of MySQL are you using? The table is not really locked, you're just seeing that as a side effect of

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
...@xaprb.com To: Carl c...@etrak-plus.com Cc: mysql@lists.mysql.com Sent: Wednesday, March 04, 2009 2:29 PM Subject: Re: Select query locks tables in Innodb Carl, Locked status in SHOW PROCESSLIST and a table being locked are different. There is a bug in MySQL that shows Locked status

Re: Select query locks tables in Innodb

2009-03-04 Thread Baron Schwartz
- Original Message - From: Baron Schwartz ba...@xaprb.com To: Carl c...@etrak-plus.com Cc: mysql@lists.mysql.com Sent: Wednesday, March 04, 2009 2:29 PM Subject: Re: Select query locks tables in Innodb Carl, Locked status in SHOW PROCESSLIST and a table being locked are different

Select query locks tables in Innodb

2009-03-03 Thread Carl
are attempting to enter transactions to wait until the select query is finished. The query is sizable so I have not included it here (I can if that would be helpful.) Explain shows (abbreviated): id select_typetabletypepossible keys key_len

Re: Select query locks tables in Innodb

2009-03-03 Thread Brent Baisley
transactions to wait until the select query is finished. The query is sizable so I have not included it here (I can if that would be helpful.)  Explain shows (abbreviated): id   select_type    table                type        possible keys                            key_len   ref        rows

Re: Select query locks tables in Innodb

2009-03-03 Thread Perrin Harkins
On Tue, Mar 3, 2009 at 10:53 AM, Carl c...@etrak-plus.com wrote: A query that is selecting data for a report locks the files that it accesses forcing users who are attempting to enter transactions to wait until the select query is finished. Is it an INSERT INTO...SELECT FROM? Those lock

Re: Select query locks tables in Innodb

2009-03-03 Thread Baron Schwartz
On Tue, Mar 3, 2009 at 12:35 PM, Brent Baisley brentt...@gmail.com wrote: A SELECT will/can lock a table. It almost always does in MyISAM (no insert/updates), almost never does in InnoDB. There is an exception to every rule. The problem is most likely in the 107488 rows part of the query.

long select query result as as query string on another select statment

2008-09-26 Thread Madan Thapa
'); - Now, select * db_users where db_id=(SELECT id FROM data_bases where dom_id=(SELECT id FROM domains where name='abc.com')); Please correct me the syntax for the above command. I am trying to use the result of one select query as a query string on another. Thanks

Re: long select query result as as query string on another select statment

2008-09-26 Thread Ananda Kumar
='abc.com')); Please correct me the syntax for the above command. I am trying to use the result of one select query as a query string on another. Thanks

Re: long select query result as as query string on another select statment

2008-09-26 Thread Madan Thapa
'); - Now, select * db_users where db_id=(SELECT id FROM data_bases where dom_id=(SELECT id FROM domains where name='abc.com')); Please correct me the syntax for the above command. I am trying to use the result of one select query as a query string on another

Re: long select query result as as query string on another select statment

2008-09-26 Thread Madan Thapa
domains where name='abc.com')); Please correct me the syntax for the above command. I am trying to use the result of one select query as a query string on another. Thanks On Fri, Sep 26, 2008 at 4:29 PM, Ananda Kumar [EMAIL PROTECTED] wrote: what is the issue ur facing. Any syntax

Re: Select Query

2008-05-25 Thread Rob Wultsch
On Fri, May 23, 2008 at 11:20 PM, Velen [EMAIL PROTECTED] wrote: Hi, I wanted to know when doing a select query how is it executed : If there is 1000 records with price10, 3000 records with flag='Y' and the table contains 200,000 records. Select code, description, price, flag from

Re: remove temporary table from SELECT query

2007-08-10 Thread Mike Zupan
buffer size or eliminating more rows from the query. -Original Message- From: Mike Zupan [mailto:[EMAIL PROTECTED] Sent: Friday, 10 August 2007 4:52 AM To: mysql@lists.mysql.com Subject: remove temporary table from SELECT query I have been pulling my hair out over a temporary table

Insert Select query problem

2007-08-10 Thread Ed Reed
Into `request` (Required, Qty) Values ('Apples', 12), ('Bananas', 112), ('Cherries', 5); Now what I*d like to do is create a single Insert Select query that creates a record in my purchase table for each of the items in my request table based on the number of items available in my inventory

Re: Insert Select query problem

2007-08-10 Thread Jay Pipes
), ('Cherries',6); Insert Into `request` (Required, Qty) Values ('Apples', 12), ('Bananas', 112), ('Cherries', 5); Now what I*d like to do is create a single Insert Select query that creates a record in my purchase table for each of the items in my request table based on the number of items available

Re: remove temporary table from SELECT query

2007-08-10 Thread Ananda Kumar
temporary table from SELECT query I have been pulling my hair out over a temporary table being created in the following query SELECT SQL_NO_CACHE SQL_CALC_FOUND_ROWS entryid,title FROM friends_test INNER JOIN entries ON friendLink=userid AND userLink=2 order

Re: remove temporary table from SELECT query

2007-08-10 Thread Ananda Kumar
: Friday, 10 August 2007 4:52 AM To: mysql@lists.mysql.com Subject: remove temporary table from SELECT query I have been pulling my hair out over a temporary table being created in the following query SELECT SQL_NO_CACHE SQL_CALC_FOUND_ROWS entryid,title FROM friends_test INNER JOIN

Re: remove temporary table from SELECT query

2007-08-10 Thread Ananda Kumar
temporary table from SELECT query I have been pulling my hair out over a temporary table being created in the following query SELECT SQL_NO_CACHE SQL_CALC_FOUND_ROWS entryid,title FROM friends_test INNER JOIN entries ON friendLink=userid AND userLink=2 order by entryid

Re: remove temporary table from SELECT query

2007-08-10 Thread Mike Zupan
buffer size or eliminating more rows from the query. -Original Message- From: Mike Zupan [mailto: [EMAIL PROTECTED] ] Sent: Friday, 10 August 2007 4:52 AM To: mysql@lists.mysql.com Subject: remove temporary table from SELECT query I have been pulling my

Re: Insert Select query problem

2007-08-10 Thread Ed Reed
); Insert Into `request` (Required, Qty) Values ('Apples', 12), ('Bananas', 112), ('Cherries', 5); Now what I*d like to do is create a single Insert Select query that creates a record in my purchase table for each of the items in my request table based on the number of items available in my

remove temporary table from SELECT query

2007-08-09 Thread Mike Zupan
I have been pulling my hair out over a temporary table being created in the following query SELECT SQL_NO_CACHE SQL_CALC_FOUND_ROWS entryid,title FROM friends_test INNER JOIN entries ON friendLink=userid AND userLink=2 order by entryid if I change userLink=2 to friendLink=2 it is fine and its

RE: remove temporary table from SELECT query

2007-08-09 Thread Andrew Armstrong
[mailto:[EMAIL PROTECTED] Sent: Friday, 10 August 2007 4:52 AM To: mysql@lists.mysql.com Subject: remove temporary table from SELECT query I have been pulling my hair out over a temporary table being created in the following query SELECT SQL_NO_CACHE SQL_CALC_FOUND_ROWS entryid,title FROM

struggling with select query

2007-02-27 Thread lee_m4c
Guys, Below is a select query which I'm stuggling with, so I'd be grateful for any help you could give me. select distinct TraderPersonalInfo.TraderID,PlatformMap.PlatformID from TraderPersonalInfo,Locations,PlatformMap,Platforms where (TraderPersonalInfo.TraderID = PlatformMap.TraderID

Re: struggling with select query

2007-02-27 Thread Rolando Edwards
with select query Guys, Below is a select query which I'm stuggling with, so I'd be grateful for any help you could give me. select distinct TraderPersonalInfo.TraderID,PlatformMap.PlatformID from TraderPersonalInfo,Locations,PlatformMap,Platforms where (TraderPersonalInfo.TraderID

RE: struggling with select query

2007-02-27 Thread Gary W. Smith
select distinct TraderPersonalInfo.TraderID,PM2.PlatformID,PM4.PlatformID from TraderPersonalInfo,Locations,Platforms PF2,Platforms PF4, PlatformMap PM2,PlatformMap PM4 where (TraderPersonalInfo.TraderID = PM2.TraderID) and (PM2.PlatformID = PF2.PlatformID) and PM2.PlatformID = 2 and

need a select query

2007-02-12 Thread balaraju mandala
Hi All, I need a select query, with which i can reach to a particular row directly. I mean if a table have 100 rows inserted, we can use select * from table1 limit 10; with this query i will have 10 rows, but my requirement is only 10th row only should come as a result. If u have any solution

Re: need a select query

2007-02-12 Thread Dušan Pavlica
select * from table1 order by field1 limit 10,1 Dusan balaraju mandala napsal(a): Hi All, I need a select query, with which i can reach to a particular row directly. I mean if a table have 100 rows inserted, we can use select * from table1 limit 10; with this query i will have 10 rows

Re: need a select query

2007-02-12 Thread balaraju mandala
Thank you Guys, your answer helpful to me.

Re: Select query problem

2006-07-27 Thread Dan Bolser
Barry wrote: Nenad Bosanac schrieb: Hi I have one problem that i can`t resolve. still need advice or is it solved? IF!!! you need IF!! :) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Select Query taking time

2006-07-24 Thread Ratheesh K J
Hello All, I run a select query to see its speed. It took around 5 seconds. Now i run the same query simultaneously twice usng two instances of the client tool. It took 10 seconds for both the queris to complete. Its not 5 secs + 5 secs. Both the queries were running till 10 secs when i saw

Re: Select Query taking time

2006-07-24 Thread Duncan Hill
On Monday 24 July 2006 09:05, Ratheesh K J wrote: Hello All, I run a select query to see its speed. It took around 5 seconds. Now i run the same query simultaneously twice usng two instances of the client tool. It took 10 seconds for both the queris to complete. Its not 5 secs + 5 secs. Both

Re: Select Query taking time

2006-07-24 Thread Duncan Hill
On Monday 24 July 2006 09:06, Duncan Hill wrote: On Monday 24 July 2006 09:05, Ratheesh K J wrote: Hello All, I run a select query to see its speed. It took around 5 seconds. Now i run the same query simultaneously twice usng two instances of the client tool. It took 10 seconds for both

Re: Select Query taking time

2006-07-24 Thread Martin Jespersen
Ratheesh K J wrote: Hello All, I run a select query to see its speed. It took around 5 seconds. Now i run the same query simultaneously twice usng two instances of the client tool. It took 10 seconds for both the queris to complete. Its not 5 secs + 5 secs. Both the queries were running

RE: Invalid syntax with STD() function when more than one field is used in select query

2006-07-21 Thread William Bronsema
To: mysql@lists.mysql.com Subject: Invalid syntax with STD() function when more than one field is used in select query Hello, I am encountering a strange issue when using the STD function. On my local development machine (MYSQL version 4.18-nt) I can run the following basic SELECT query

Invalid syntax with STD() function when more than one field is used in select query

2006-07-20 Thread William Bronsema
Hello, I am encountering a strange issue when using the STD function. On my local development machine (MYSQL version 4.18-nt) I can run the following basic SELECT query with no problems: SELECT STD(`LAPSETIME`),UKEY FROM 4b3f91f64a19529a84dff4982c8a6bc5 GROUP BY UKEY When I test this query

Re: Select query problem

2006-06-06 Thread Barry
Nenad Bosanac schrieb: Hi I have one problem that i can`t resolve. still need advice or is it solved? -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Select query problem

2006-06-03 Thread Nenad Bosanac
, 2 4, 3, 23, 6, 3, 3 and table referent looks like ReferentID SifraReferenta ImeReferenta PrezimeReferenta 1, '01', 'Nada', 'Nadi#263;' 2, '03', 'Goran', 'Gavran#269;i#263;' 3, '04', 'Dragan', 'PeriÅ¡iÄ#135;' I want to make select query so thatt result from that query look something like

SELECT Query GROUP BY

2006-05-11 Thread Jay
Hello MySQL Users I have a contract table. Each contract has a certain level, which can be in a range from 1-5. This information is stored as a number. There is no additional table for the levels. I would like to get a list with the amount of contracts of each level - including 0 for the levels

Re: SELECT Query GROUP BY

2006-05-11 Thread Peng Yi-fan
, May 11, 2006 5:41 PM Subject: SELECT Query GROUP BY Hello MySQL Users I have a contract table. Each contract has a certain level, which can be in a range from 1-5. This information is stored as a number. There is no additional table for the levels. I would like to get a list

Re: SELECT Query GROUP BY

2006-05-11 Thread Jay
- From: Jay [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, May 11, 2006 5:41 PM Subject: SELECT Query GROUP BY Hello MySQL Users I have a contract table. Each contract has a certain level, which can be in a range from 1-5. This information is stored as a number

Re: SELECT Query GROUP BY

2006-05-11 Thread Dan Buettner
COUNT(id) FROM contract GROUP BY level - Original Message - From: Jay [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, May 11, 2006 5:41 PM Subject: SELECT Query GROUP BY Hello MySQL Users I have a contract table. Each contract has a certain level, which can be in a range

Re: SELECT Query GROUP BY

2006-05-11 Thread Jay
Thank you Dan, [...] Otherwise it's just not possible to show what's not there - in your case, think of this: how would MySQL know to show 5 when there are no 5's, but not also show the count for every other integer that's not there? (6, 7, 8, .. 1048576, 1048577, etc.) [...] Sure, easy to

Re: SELECT Query GROUP BY

2006-05-11 Thread Dan Buettner
No problem, glad to help. I noticed your comment in an earlier message about it seeming like a workaround - I don't think it seems like a workaround at all. Having a table with the possible values makes for a normal database structure, and an approach that should keep you from having to

MySQL select query - newbie

2006-04-23 Thread Nanu Kalmanovitz
Hi! System is Novell SBS 6.5 sp1 with Apache 2.0.48, MySQL ver. 4.0.15a, PHP 4.2.3. We try to define a select query that takes the values of the variables 'varKoshi' and 'varKvish' based on the following 4 tables: 'varKoshi' vv 'varKvish

Re: MySQL select query - newbie

2006-04-23 Thread John Hicks
Nanu Kalmanovitz wrote: Hi! System is Novell SBS 6.5 sp1 with Apache 2.0.48, MySQL ver. 4.0.15a, PHP 4.2.3. We try to define a select query that takes the values of the variables 'varKoshi' and 'varKvish' based on the following 4 tables: 'varKoshi' vv 'varKvish

A doubt in SELECT query

2006-04-07 Thread subramani
hello all, In which order the datas are displayed, when the SELECT quey is used ? Is it random or the order in which the datas are inserted? -- r.subramani My log file: http://subramanitce.blogspot.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: A doubt in SELECT query

2006-04-07 Thread Barry
subramani wrote: hello all, In which order the datas are displayed, when the SELECT quey is used ? Is it random or the order in which the datas are inserted? -- r.subramani My log file: http://subramanitce.blogspot.com Random -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o

Re: A doubt in SELECT query

2006-04-07 Thread Rhino
method of forcing the output to be in a specific order. -- Rhino - Original Message - From: subramani [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, April 07, 2006 10:22 AM Subject: A doubt in SELECT query hello all, In which order the datas are displayed, when the SELECT

Re: Complicated select query

2006-03-28 Thread Barry
Gabriel PREDA wrote: About the first problem I think you need to give us more data ! Okay i thought yesterday how i can make up some real problem and have this: Guess you have a database with customers and a database with projects. Those prijects have timestamps so you know what time he

Re: Complicated select query

2006-03-28 Thread Barry
|06|03 |My small Project|2005-02-10| |07|03 |My big Project! |2005-06-11| Small mistake. The project with ID 06 should have a date above ID 07. Sorry for that! -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- MySQL General Mailing List For

Re: Complicated select query

2006-03-28 Thread Pure Web Solution
try something like this select customer,max(time),name from customers join projects on projects.parent_id=customer.id group by customer; regards Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services Barry [EMAIL PROTECTED] wrote: Gabriel PREDA wrote: About

Complicated select query

2006-03-27 Thread Barry
Hello Everyone! Probably somone can help me out. I have 2 databases and it looks like: db1 Project 1 db2 Subproject 1 db2 Subproject 2 db1 Project 2 db2 Subproject 1 db1 Project 3 db2 Subproject 1 db2 Subproject 2 db2 Subproject 3 What kind of a query would give me the first

Re: Complicated select query

2006-03-27 Thread Gabriel PREDA
About the first problem I think you need to give us more data ! As for the seccond... I haven't sen such loops yet... But you can go arround them and do something like: SELECT * FROM db WHERE (id BETWEEN 5 AND 50) AND id%5=0 -- Gabriel PREDA Senior Web Developer

Re: Complicated select query

2006-03-27 Thread Peter Brawley
Barry, Hello Everyone! Probably somone can help me out. I have 2 databases and it looks like: (Wayne Ratliff is dead but his mistake lives on :-) ). You mean tables, right? db1 Project 1 db2 Subproject 1 db2 Subproject 2 db1 Project 2 db2 Subproject 1 db1 Project 3 db2 Subproject 1

INSERT...SELECT Query Help Request.

2006-03-22 Thread Yesmin Patwary
Dear All, First of all, I would like to thank Shawn Green, Peter Brawley and Josh for their kind help in my previous issue. I have a table named master_list with two field customer_id and list_code. I need to insert only non existent records in master_list from a child_list. Both

Re: INSERT...SELECT Query Help Request.

2006-03-22 Thread SGreen
Yesmin Patwary [EMAIL PROTECTED] wrote on 03/22/2006 09:56:20 AM: Dear All, First of all, I would like to thank Shawn Green, Peter Brawley and Josh for their kind help in my previous issue. I have a table named master_list with two field customer_id and list_code. I need to insert

Re: Help with a SELECT query

2006-01-06 Thread Gleb Paharenko
Hello. Usually working with IP addresses in a numeric form is faster. Use INET_NTOA() and INET_ATON() functions to store IP addresses as unsigned ints. To work with subnetworks instead of like 'xxx.xxx.%' use ip_address_in_numeric_form between inet_aton('xxx.xxx.0.0') and

  1   2   3   4   >