RE: Query Help

2004-02-28 Thread John Berman
[mailto:[EMAIL PROTECTED] Sent: 29 February 2004 00:08 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Query Help At 23:09 + 2/28/04, John Berman wrote: Hi Using MySql 4.x and need some help with a query There are two tables Lists Which holds list name +other stuff Members Which holds

RE: Query Help

2004-02-28 Thread Paul DuBois
At 0:32 + 2/29/04, John Berman wrote: Paul Err no, new area for me this My two queries independently look like this This give me all the lists some one is not a member of SELECT lists_.Name FROM lists_ WHERE (((lists_.Name_) Not In (select members_.List_ from members_ where

RE: Query Help

2004-02-28 Thread John Berman
Paul Well getting there, im now selecting the correct number of columns but get a cant be distinct error ? John B -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: 29 February 2004 00:47 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Query Help At 0:32

RE: Query Help

2004-02-28 Thread John Berman
PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Query Help At 0:32 + 2/29/04, John Berman wrote: Paul Err no, new area for me this My two queries independently look like this This give me all the lists some one is not a member of SELECT lists_.Name FROM lists_ WHERE (((lists_.Name_

RE: Query Help

2004-02-28 Thread Paul DuBois
At 2:45 + 2/29/04, John Berman wrote: Got it working at last SELECT lists_.DescShort_ FROM lists_ WHERE (((lists_.Name_) Not In (select members_.List_ from members_ where members_.EmailAddr_ like (' em ' union SELECT lists_.DescShort_ FROM members_ INNER JOIN lists_ ON members_.List_ =

Re: Query optimization help

2004-02-26 Thread Sasha Pachev
Chuck Gadd wrote: I've got a query that I can't seem to get optimized, so I'm hoping someone here can spot something I've missing! Table has three columns: CoordID int unsigned, Zip_Lo char(9), Zip_Hi char(9) Table has 3 million records indexes: acg_lo (Zip_Lo) acg_hi (Zip_Hi) acg_combined

Re: Query Problems

2004-02-26 Thread Sasha Pachev
Eric Scuccimarra wrote: Have one more question - indexing the relevant columns based on the explain info has made all of our queries immensely faster. But it appears that new rows are not automatically indexed. Does anyone know about this and if they are not indexed how do I reindex the tables?

Re: Query Problems

2004-02-26 Thread Keith C. Ivey
On 26 Feb 2004 at 13:22, Eric Scuccimarra wrote: But it appears that new rows are not automatically indexed. Does anyone know about this and if they are not indexed how do I reindex the tables? You're misunderstanding something. When you create an index, all the rows in the table are

Re: Query Problems

2004-02-26 Thread Eric Scuccimarra
Have one more question - indexing the relevant columns based on the explain info has made all of our queries immensely faster. But it appears that new rows are not automatically indexed. Does anyone know about this and if they are not indexed how do I reindex the tables? Thanks. -- MySQL

Re: Query optimization help

2004-02-26 Thread vpendleton
Without seeing the data I am assuming that you are going over the 30% threshold with your less/greater equal to where clauses. What sort of criteria are you asking the database engine to search for? Original Message On 2/25/04, 9:44:02 PM, [EMAIL PROTECTED] wrote regarding Re: Query

Re: Query Problems

2004-02-26 Thread Eric Scuccimarra
For anyone who is interested the thing that worked and brought the query down from 8 minutes to 5 seconds was separating out the JOIN to remove the OR. I made it into two queries and UNIONed them together and it all works beautifully now. Thanks. At 02:33 PM 2/25/2004 -0800, Daniel Clark

RE: Query Problems

2004-02-25 Thread David Perron
What does the explain look like? -Original Message- From: Eric Scuccimarra [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 1:03 PM To: [EMAIL PROTECTED] Subject: Query Problems I am doing a very simple query joining two copies of tables with identical structures but

Re: Query Problems

2004-02-25 Thread Daniel Clark
Do you have separate indexes on: Table1.ID Table2.ID Table1.Field1 Table2.Field1 Table1.Field1 Table1.Field2 Select* FROM Table1 as a INNER JOIN Table2 as b ON (a.ID = b.ID or (a.Field1 = b.Field1 and a.Field2 = b.Field2)) WHERE bla bla bla We have

Re: Query Problems

2004-02-25 Thread Keith C. Ivey
On 25 Feb 2004 at 13:09, Eric Scuccimarra wrote: Select* FROM Table1 as a INNER JOIN Table2 as b ON (a.ID = b.ID or (a.Field1 = b.Field1 and a.Field2 = b.Field2)) WHERE bla bla bla It's hard to know without seeing the indexes and the full WHERE clause, but part of the

Re: Query Problems

2004-02-25 Thread Eric Scuccimarra
No, we tried individual indexes and then one big grouped index but not individual indexes on each of the fields. Adding the index actually added a few seconds to the query so we weren't sure if that was the way to go. I'll try this, though. Eric At 10:36 AM 2/25/2004 -0800, Daniel Clark

Re: Query Problems

2004-02-25 Thread Daniel Clark
I know Oracle likes the indexes separatly, but mySQL might like combinations. No, we tried individual indexes and then one big grouped index but not individual indexes on each of the fields. Adding the index actually added a few seconds to the query so we weren't sure if that was the way to

Re: Query help - add results then divide by

2004-02-25 Thread vpendleton
What about SELECT (SUM( ads.col * 1.91) * ads.depth ) ) / 131.77 FROM ads WHERE date = '2004-02-26' AND editionID = '13' AND ads.page = '16' Original Message On 2/25/04, 4:19:12 PM, Rogers, Dennis [EMAIL PROTECTED] wrote regarding Query help - add results then divide by : Good

RE: Query help - add results then divide by

2004-02-25 Thread Rogers, Dennis
: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; Hines, David Subject: Re: Query help - add results then divide by What about SELECT (SUM( ads.col * 1.91) * ads.depth ) ) / 131.77 FROM ads WHERE date = '2004-02-26' AND editionID = '13' AND ads.page = '16' Original Message On 2/25/04, 4:19:12 PM

Re: Query help - add results then divide by

2004-02-25 Thread Bob Ramsey
I think that you can just do this: select sum(ads.col)*1.191*sum(ads.depth)/131.77 where date ='2004-02-26' AND editionID = '13' AND ads.page = '16'; because of the disttributive property of multiplication. (2 * 1.191) +(6*1.91) +(4*1.91)/131.77 = 12 *1.91/131.77 = (12*1.91)/131.77 =

Re: Query help - add results then divide by

2004-02-25 Thread Sasha Pachev
Rogers, Dennis wrote: Good afternoon, How can I take the 3 results below add them together then divide by 131.77? Can it all be done in one SQL statement? Thanks in advance. mysql describe ads; +---+---+--+-+++

Re: Query Problems

2004-02-25 Thread Eric Scuccimarra
Tried to make the indexes separate and did an EXPLAIN and no performance increase and this is what the explain says: id select_type table typepossible_keys key key_len ref rowsExtra 1 SIMPLE tb ALL PRIMARY,tb_ndx3,tb_ndx4,tb_ndx5 NULL

Re: Query optimization help

2004-02-25 Thread daniel
Maybe i'm wrong here, someone correct me, if its just int's you are gonna use set the field types to bigint it may search faster you are doing a character search, to get there quicker in a text search scenerio i'd suggest mysql4 and full text searching MATCH AGAINST I've got a query that I

Re: query only that return the fields that an table existe

2004-02-18 Thread Rhino
If your table name is bar and it is in a database named foo, the following commands will show you the columns in that table: describe foo.bar; -OR- show columns from foo.bar; If you try either command on a table that does not exist, you get an error message. Therefore, the query only returns

Re: query only that return the fields that an table existe

2004-02-18 Thread Luiz Rafael Culik Guimaraes
Hi Rhino If your table name is bar and it is in a database named foo, the following commands will show you the columns in that table: describe foo.bar; -OR- show columns from foo.bar; If you try either command on a table that does not exist, you get an error message. Therefore, the

Re: query only that return the fields that an table existe

2004-02-18 Thread Ligaya Turmelle
Go here http://www.php.net/manual/en/function.mysql-field-type.php in the PHP manual and you will find in example 1 how to get all the information about a table. You can then pare it down just to get the information you want. Respectfully, Ligaya Turmelle Luiz Rafael Culik Guimaraes [EMAIL

Re: Query to another server

2004-02-17 Thread fbeltran
PROTECTED] 17/02/2004 12:52 a.m. To Terence [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: Query to another server You might be able to cheat and replicate the required database to the local machine. Regards, Chris Terence wrote: you'll need to create temporary tables in one

Re: Query to another server

2004-02-17 Thread Chris Nolan
servers to one server? many masters and one slave, the slave might have replicas of each master database (cause i need to query on many diferent mysql servers) thanks... FBR Chris Nolan [EMAIL PROTECTED] 17/02/2004 12:52 a.m. To Terence [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: Query

Re: Query to another server

2004-02-16 Thread Jeremy Zawodny
On Mon, Feb 16, 2004 at 11:54:43PM -0700, [EMAIL PROTECTED] wrote: Is it possible to query one server from another even if those servers are in diferent machines at diferent locations? for example: select * from localtable left join remoteserver.remotedatabase.remotetable where

Re: Query to another server

2004-02-16 Thread Karam Chand
I dont think so :( Karam --- [EMAIL PROTECTED] wrote: Is it possible to query one server from another even if those servers are in diferent machines at diferent locations? for example: select * from localtable left join remoteserver.remotedatabase.remotetable where localtable.key =

Re: Query to another server

2004-02-16 Thread Terence
you'll need to create temporary tables in one of the servers based on the results of the other and then join. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 2:54 PM Subject: Query to another server Is it possible to query one server

Re: Query to another server

2004-02-16 Thread Chris Nolan
You might be able to cheat and replicate the required database to the local machine. Regards, Chris Terence wrote: you'll need to create temporary tables in one of the servers based on the results of the other and then join. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL

Re: Query fast via mysql CLI, Same query slow via Perl DBI

2004-02-13 Thread gerald_clark
Daniel J. Conlon wrote: Hi, When executing this query through the 'mysql' command line utility, the result is returned from the database server immediately and the database server does not create a temporary file. (SELECT domains.domain,accounts.owner,accounts.type,accounts.server,accounts.win

Re: Query Question

2004-02-11 Thread Eamon Daly
SELECT * FROM test ORDER BY RAND() LIMIT 1; See pp. 694-695 in the MySQL Cookbook. Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 - Original Message - From: Jack Lauman [EMAIL PROTECTED] To:

Re: Query Question

2004-02-11 Thread Alec . Cawley
Jack Lauman [EMAIL PROTECTED] wrote on 11/02/2004 11:47:20: I have a table containing information about different businesses. I want to randomly select a single row from the table using a prepared statement in a java bean. What is the most eficient way to do this? Try SELECT columns

RE: Query matching

2004-02-06 Thread Mike Johnson
From: Ed Curtis [mailto:[EMAIL PROTECTED] I've been challenged to write a matching query in a project and do not know how to handle a part of it. The criteria are as follows: SELECT * from pages WHERE changelog.agent = pages.agent AND changelog.company = pages.company AND

RE: Query matching

2004-02-06 Thread John McCaskey
Yes, I think the most straight forward way is to simply put in a series of grouped OR statements. See below. SELECT * from pages WHERE changelog.agent = pages.agent AND changelog.company = pages.company AND changelog.magazine = pages.magazine AND ( changelog.orig_id = pages.mls_1 OR

RE: Query matching

2004-02-06 Thread Ed Curtis
Thanks, that seemed the sensible way to me as well. I just didn't know for sure if you could do that in a MySQL query for sure. Thanks, Ed On Fri, 6 Feb 2004, John McCaskey wrote: Yes, I think the most straight forward way is to simply put in a series of grouped OR statements. See below.

Re: query the data of a fulltext index directly from index?

2004-02-04 Thread Matt W
Hi Sergei! Great news. Thanks very much! :-) Matt - Original Message - From: Sergei Golubchik Sent: Tuesday, February 03, 2004 1:54 PM Subject: Re: query the data of a fulltext index directly from index? Hi! On Feb 02, Matt W wrote: Sergei, Any chance of getting a ft_dump

Re: query the data of a fulltext index directly from index?

2004-02-04 Thread Matt W
Sergei, Any chance of getting a ft_dump Windows binary in the distribution? :-) Regards, Matt - Original Message - From: Sergei Golubchik Sent: Monday, February 02, 2004 11:33 AM Subject: Re: query the data of a fulltext index directly from index? Hi! On Feb 02, Alexander Bauer

Re: query the data of a fulltext index directly from index?

2004-02-03 Thread Sergei Golubchik
Hi! On Feb 02, Matt W wrote: Sergei, Any chance of getting a ft_dump Windows binary in the distribution? :-) Chances are good :) It was added to rpms and binary unix distributions 5 min ago, and it should be added to windows distro too. Note - the new name is myisam_ftdump. Regards,

Re: Query time out during login over network

2004-02-02 Thread Victoria Reznichenko
Chris W [EMAIL PROTECTED] wrote: I have recently installed suse 9.0 linux which has MySQL 4.0.15 as part of the distribution. After I set up my users I was able to use mysqldump and pipe it into mysql on my windows machine running 4.0.16 to dump a database to the suse box. However, now

Re: query the data of a fulltext index directly from index?

2004-02-02 Thread Dan Nelson
In the last episode (Feb 02), Alexander Bauer said: Hello, is there any way to get the fulltext index contents directly? I'm looking for a way to list all indexed words from a column to provide a filter selection. How can I access the index data without walking through all table rows, get

Re: query the data of a fulltext index directly from index?

2004-02-02 Thread Sergei Golubchik
Hi! On Feb 02, Alexander Bauer wrote: Hello, is there any way to get the fulltext index contents directly? I'm looking for a way to list all indexed words from a column to provide a filter selection. How can I access the index data without walking through all table rows, get the column

RE: Query problem

2004-02-01 Thread Andrew Braithwaite
Hi, You need: select job,avg(sal) from emp group by 1 order by 2 limit 1; Cheers, Andrew -Original Message- From: Edouard Lauer [mailto:[EMAIL PROTECTED] Sent: Saturday 31 January 2004 19:23 To: [EMAIL PROTECTED] Subject: Query problem Hello, I would like to query the littlest

Re: Query problem

2004-01-31 Thread Roger Baklund
* Edouard Lauer I would like to query the littlest average salary. I have a table with employees and their salary like that: +---+--+ | job | sal | +---+--+ | CLERK | 800 | | SALESMAN | 1600 | | SALESMAN | 1250 | | MANAGER | 2975 | | SALESMAN |

re: Query help

2004-01-27 Thread Jeremy March
No. With the method you're using (storing the parent id with each record) you have to use a recursive series of queries to show the subtree levels. Take a look at this article--especially the second and third pages about the modified preorder tree traversal and nested sets. There are many

Re: Query was empty -- any ideas

2004-01-25 Thread Sam Folk-Williams
Okay, I feel dumb. After seeing my message appear on the list, in a different font, I can see that here: $result = mysql_query($sq12,$connection) or die (mysql_error()); I typed $sq12 instead of $sql2 -- sorry! Works now. Sam Sam Folk-Williams wrote: Hi, This script keeps returning the

Re: query performance

2004-01-23 Thread mos
At 07:10 PM 1/23/2004, Larry Brown wrote: I have a db that had some 20,000 records or so in it. I have a query to find out how many jobs have been input during the current day. To add them I ran the following query... select count(idnumber) from maintable where inputdatetime '$date 00:00:00'

Re: query syntax help

2004-01-20 Thread Fred van Engen
On Tue, Jan 20, 2004 at 04:10:44PM -0600, Mike Blezien wrote: I've been looking at this SQL query a dozen times or more, but keep getting a syntax error message, Query: SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS name,aw.siteid,ai.email,as.username,as.status FROM

Re: query syntax help

2004-01-20 Thread Jochem van Dieten
Mike Blezien said: I've been looking at this SQL query a dozen times or more, but keep getting a syntax error message, Query: SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS name,aw.siteid,ai.email,as.username,as.status FROM affiliate_info ai,affiliate_signup

Re: query syntax help

2004-01-20 Thread Mike Blezien
Thx's Fred... as soon as I sent the email and re-read it again... I spotted the 'as' alias table reference to the table, was actual a reserved word,..causing the error :) thx's again. -- MikemickaloBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing

Re: query efficiency

2004-01-12 Thread Matt W
Message - From: Daniel Canham Sent: Monday, January 12, 2004 2:48 AM Subject: Re: query efficiency Thats not really what I meant. I have 5 (or whatever) columns in a table. I need to update values changed in those columns during processing. But I have no way of knowing what column values need

Re: Query takes 1703.57 sec

2004-01-11 Thread Dan Nelson
In the last episode (Jan 11), Nawal Lodha said: I have a query like - SELECT AdvElement.c_objectId , AdvElement.c_createdOn , AdvElement.c_modifiedOn , AdvElement.c_elementType , AdvElement.c_packageId , AdvElement.c_stereoTypeId , AdvElement.c_objectType , AdvElement.c_versionNumber ,

RE: Query takes 1703.57 sec

2004-01-11 Thread Nawal Lodha
Dear Dan, Have tried that and it works. The query executes in less than 0.1 sec with indexes. Thanks for the immediate help. Nawal. -Original Message- From: Dan Nelson [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 11:29 AM To: Nawal Lodha Cc: [EMAIL PROTECTED] Subject: Re

Re: Query gift ?

2003-12-24 Thread Martijn Tonies
I am using MySQL 4.0.16 on Xp. I have two tables, friend table and a gift table. I have to buy one gift per friend before tonight. How to do with mysql ? You cannot. MySQL doesn't buy any gifts for you. In other words: please describe the problem in more detail. What is the structure of

Re: Query syntax.

2003-12-23 Thread Data Boy
a.User_Account = b.Device_Account AND b.Device_Name LIKE 'HP%' - Original Message - From: Michael Stassen [EMAIL PROTECTED] To: Will Lowe [EMAIL PROTECTED] Cc: Data Boy [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 22, 2003 1:25 PM Subject: Re: Query syntax. Will Lowe

Re: Query syntax.

2003-12-23 Thread Michael Stassen
Data Boy wrote: Will and Michael, Thanks very much for the the replies. This works well. Is it possible to use this syntax and search for cases where they have two different kinds of equipment? Say an Ultra 5 and a HP Plotter? TIA, DB SELECT User_Account FROM Users AS a, Device_Name from

[Fwd: Re: Query syntax.]

2003-12-23 Thread Michael Stassen
The mysql list sent this back to me, so I'm resending. My apologies to anyone who ends up getting it twice. Data Boy wrote: Will and Michael, Thanks very much for the the replies. This works well. Is it possible to use this syntax and search for cases where they have two different kinds of

Re: Query syntax.

2003-12-22 Thread Will Lowe
Select User_Account from Users as a, Devices as b WHERE a.User_Account = (Select DISTINCT(b.Device_Account) from b.Devices WHERE b.Device_Name LIKE 'HP%' ) I'm running 3.23.49 which I know is not the most current..it was installed 3.x does not support

Re: Query syntax.

2003-12-22 Thread Michael Stassen
Will Lowe wrote: Select User_Account from Users as a, Devices as b WHERE a.User_Account = (Select DISTINCT(b.Device_Account) from b.Devices WHERE b.Device_Name LIKE 'HP%' ) I'm running 3.23.49 which I know is not the most current..it was installed 3.x does not

Re: Query Help 2

2003-12-19 Thread cktsoi
yes, just a typing mistakes~~ anyway, both of them work fine. gerald_clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] DId I type that? I meant 1,4 I left it as substring because that was what he tried. ¿n©_ ¡E¢X ¡¸ wrote: yes, it should work, but should not be 1,1 ?

Re: Query Help 2

2003-12-18 Thread gerald_clark
How about: update RemoteStation set company=substring(ID,1,1); Jeff McKeon wrote: Damn fat fingers and MS Outlook. I sent the Query Help message before I was finishes typing. Sorry... I have two tables, customer table and a company table The customer table has an ID field that is 8 characters

Re: Query Help 2

2003-12-18 Thread ¿n©_ ¡E¢X ¡¸
yes, it should work, but should not be 1,1 ? or simply: UPDATE RemoteStation SET company=LEFT(ID, 4); ? gerald_clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How about: update RemoteStation set company=substring(ID,1,1); Jeff McKeon wrote: Damn fat fingers and MS

Re: Query Help 2

2003-12-18 Thread gerald_clark
DId I type that? I meant 1,4 I left it as substring because that was what he tried. ¿n©_ ¡E¢X ¡¸ wrote: yes, it should work, but should not be 1,1 ? or simply: UPDATE RemoteStation SET company=LEFT(ID, 4); ? gerald_clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How about:

Re: query over several tables

2003-12-17 Thread Michael Stassen
Philippe Rousselot wrote: Hi I have three linked tables : store, catalogue, and sales store : ID_store, store, date catalogue : ID_product, product sales : ID_sales, ID_store, ID_product, product, quantity I would like a view giving me ALL the products in catalogue with the quantity per store

RE: Query to emulate what mysqldump does

2003-12-04 Thread Wouter van Vliet
as the MySQL client is running on... Cheers, Andrew -Original Message- From: Matt Babineau [mailto:[EMAIL PROTECTED] Sent: Wednesday 03 December 2003 17:37 To: [EMAIL PROTECTED] Subject: RE: Query to emulate what mysqldump does On Wed, 2003-12-03 at 15:22, Jay Blanchard wrote

Re: Query Help

2003-12-04 Thread Rory McKinley
On 2 Dec 2003 at 7:20, Greg Jones wrote: snip select l.ltsysid,l.lientraknum, c.name from lientrak as l, customer as c where l.custsysid=c.custsysid and l.ltsysid in (select l2.ltsysid from lientrak as l2 where l2.lientraknum like '2003-%') snip Hi greg Yopur problem is that you

RE: Query to emulate what mysqldump does

2003-12-03 Thread Jay Blanchard
[snip] Are there any query equivalencies to mysqldump? I am looking for a way to get a complete database dump via php and I don't have access to the system CLI to run mysql dump. [/snip] Run mysqldupmp in a php file using exec...see http://www.php.net/exec http://www.mysql.com/mysqldump looks

RE: Query to emulate what mysqldump does

2003-12-03 Thread Matt Babineau
On Wed, 2003-12-03 at 15:13, Jay Blanchard wrote: [snip] Are there any query equivalencies to mysqldump? I am looking for a way to get a complete database dump via php and I don't have access to the system CLI to run mysql dump. [/snip] Run mysqldupmp in a php file using exec...see

RE: Query to emulate what mysqldump does

2003-12-03 Thread Jay Blanchard
[snip] I thought about that Jay, but the mysql server is not on the webserver machine. Any other suggestions? [/snip] phpmyadmin will allow you to connect to the remote MySQL server and do dumps -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: Query to emulate what mysqldump does

2003-12-03 Thread Matt Babineau
On Wed, 2003-12-03 at 15:22, Jay Blanchard wrote: [snip] I thought about that Jay, but the mysql server is not on the webserver machine. Any other suggestions? [/snip] phpmyadmin will allow you to connect to the remote MySQL server and do dumps What if I don't have phpmyadmin available?

RE: Query to emulate what mysqldump does

2003-12-03 Thread Jay Blanchard
[snip] What if I don't have phpmyadmin available? :) What I am trying to do, it setup a simple script to pull down essentially a backup of their database and write it to a file on my development machine so when they mess up their data (..and I said WHEN) I can be a hero and revert them to the

RE: Query to emulate what mysqldump does

2003-12-03 Thread Andrew Braithwaite
: Matt Babineau [mailto:[EMAIL PROTECTED] Sent: Wednesday 03 December 2003 17:37 To: [EMAIL PROTECTED] Subject: RE: Query to emulate what mysqldump does On Wed, 2003-12-03 at 15:22, Jay Blanchard wrote: [snip] I thought about that Jay, but the mysql server is not on the webserver machine. Any

Re: Query Help

2003-12-02 Thread Chris Boget
Access. However, when I run it against MySQL I get an error. select l.ltsysid,l.lientraknum, c.name from lientrak as l, customer as c where l.custsysid=c.custsysid and l.ltsysid in (select l2.ltsysid from lientrak as l2 where l2.lientraknum like '2003-%') Sub queries are not going to be

Re: Query Help

2003-12-02 Thread Stephen Fromm
- Original Message - From: Chris Boget [EMAIL PROTECTED] To: Greg Jones [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 8:32 AM Subject: Re: Query Help Access. However, when I run it against MySQL I get an error. select l.ltsysid,l.lientraknum, c.name from

Re: Query with temporary table

2003-11-14 Thread Victoria Reznichenko
Jeff McKeon [EMAIL PROTECTED] wrote: Is is possible to do a select query with a left join from a real table to a temporary table? Yes. I'm trying it but keep getting unkown table 'tablename' in field list error. Show us you query. Don't forget that temporary table is visible only for the

Re: query not visible by sh processlist

2003-11-14 Thread Egor Egorov
Sohail Hasan [EMAIL PROTECTED] wrote: Is there a possibility that a certain query that is executing in mysql by application is not visible by a show processlist command. As happened in my database a query was taking number of CPU cycles but when seen through the show processlist command

Re: Query question (php)

2003-11-11 Thread Roger Baklund
* Obantec Support1 mysql 3.23.56 RH 8.0 I have got the sql query to work but is there a better way of writing the syntax? $sql = SELECT * FROM Contacts WHERE Categories=\$calltype\ and BusinessCodes !=\R\ and BusinessCodes !=\I\ and BusinessCodes !=\L\ ORDER BY Company ASC; basically

Re: Query question (php)

2003-11-11 Thread Obantec Support1
- Original Message - From: Roger Baklund [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Obantec Support1 [EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 8:46 PM Subject: Re: Query question (php) * Obantec Support1 mysql 3.23.56 RH 8.0 I have got the sql query to work

Re: query time in ~3M row table

2003-11-04 Thread Brent Baisley
You're searching on a calculation so I'm pretty sure that MySQL is not using an index for the search. You should use explain in front of your query to see if MySQL is using indexes. You do have that date field indexed, don't you? You should search on ApacheDate between 9/1/2003 and 10/1/2003.

Re: query time in ~3M row table

2003-11-04 Thread jabbott
Yes, it is an indexed field: mysql explain select count(*) from hitstats where year(apacheDate) = 2003 and - month(apacheDate) = 9; ++-+--+---+---+---+-+--+-+--+ | id | select_type | table| type |

Re: query time in ~3M row table

2003-11-04 Thread Matt W
: [EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 5:11 PM Subject: Re: query time in ~3M row table Yes, it is an indexed field: mysql explain select count(*) from hitstats where year(apacheDate) = 2003 and - month(apacheDate) = 9

Re: query time in ~3M row table

2003-11-04 Thread Dan Nelson
In the last episode (Nov 04), [EMAIL PROTECTED] said: I have a question about how long queries should be taking and if my server is too small for what I want to be doing. I have a table setup to record stats from an apache web server. I import the file currently once per month. Here is

Re: query time in ~3M row table

2003-11-04 Thread Brent Baisley
I had thought it was inclusive, but in quick tests I discovered it was not. I haven't tried to look it up in the documentation yet. In my test I did a query on a contact database like this: select lastname from contacts where lastname between 'A' and 'B'; Only 'A' names are returned. Yes, there

Re: query time in ~3M row table

2003-11-04 Thread Dan Nelson
In the last episode (Nov 04), Brent Baisley said: I had thought it was inclusive, but in quick tests I discovered it was not. I haven't tried to look it up in the documentation yet. In my test I did a query on a contact database like this: select lastname from contacts where lastname between

Re: query time in ~3M row table

2003-11-04 Thread Brent Baisley
Wow, ouch. That is an awfully bright light bulb that just lit up in my head. Duh, too obvious for me to see. 1 comes before 2 except after c. On Tuesday, November 4, 2003, at 06:50 PM, Dan Nelson wrote: In the last episode (Nov 04), Brent Baisley said: I had thought it was inclusive, but in

Re: query time in ~3M row table

2003-11-04 Thread Brent Baisley
It looks like MySQL is searching on the url first. I'd be curious if you reversed your WHERE clause order, put your ApacheDate first and see if MySQL optimizes your query differently. I'm assuming your URL field is rather large, thus a long string comparison is taking place even though

Re: query time in ~3M row table

2003-11-04 Thread Matt W
Sent: Tuesday, November 04, 2003 5:44 PM Subject: Re: query time in ~3M row table If you make the composite index (urlIndex, ApacheDate) - then the WHERE condition for urlIndex cannot be a LIKE condition, it must be an exact condition (range should be ok too) otherwise the composite index

Re: query

2003-10-31 Thread Roger Baklund
* [EMAIL PROTECTED] aka Catalin I have 6 tables of type (clientcharacter, amountnumeric) and i want to join them in a single table containing the client and all the amounts (A1, A2, ..., A6) - 6 rows. A client can be in a single table or in many but is distinct in a table. T1 (C, A1)

Re: query

2003-10-31 Thread Roger Baklund
* Ciubotariu Catalin Thanks but I have the tables. What I didn't know is how I can join them. ok, but you got it now? The final step in my previous message was what you needed? A1 ... A6 mean different columns. Yes, that was clear from your previous message. What was unclear was if they

Re: query

2003-10-31 Thread Roger Baklund
* Ciubotariu Catalin Your solution work only with a table of clients, I don't have one. I have only 6 tables with clients and amounts and I need to join them. Should I have to make a table with clients? It's realy necessary? Please reply to the list, others may have similar problems. :) Yes,

Re: Query status

2003-10-23 Thread Per Andreas Buer
Filip Rachunek [EMAIL PROTECTED] writes: Hello, can somebody tell me what the status Writing to net returned by show processlist exactly mean? I've tried to find it in MySQL documentation but either it's not there or I missed it. I am asking because this status is usually shown when my J2EE

Re: Query status

2003-10-23 Thread Filip Rachunek
Are you sure you don't have any errors in your SQL? Maybe your query returns a karthesian product - and this might kill your J2EE application. Check out your slow-log - the query is probably there. -- Per Andreas Buer Thanks for your response Per. Yes, the query is at my slow-log, I already know

Re: Query status

2003-10-23 Thread jlord
:15 PM cc Subject Re: Query status

Re: Query Error

2003-10-13 Thread Daniel Kasak
Timotius Alfa wrote: Pls help me guys. what's wrong with this command ? select a.siswa_id,a.nama,b.Nilai from Query_DataSiswa a left join ( select siswa_id,Nilai,Tes_Id from Nilai_Harian where tes_id = 1 and pertemuan = 1 and paket_id = 1 and tingkat = 1) b on a.siswa_id = b.siswa_id where

Re: Query help

2003-10-07 Thread Mojtaba Faridzad
you can create a temporary table (as del_temp_table) by this select command: SELECT faqcat.cat FROM faqcat LEFT JOIN article ON faqcat.cat = article.cat WHERE article.cat IS NULL; then delete them: DELETE FROM faqcat USING faqcat, del_temp_table WHERE faqcat.cat = del_temp_table.cat ; I hope

RE: Query help

2003-10-07 Thread Fortuno, Adam
Darryl, At first blush, I would try something like: DELETE faqcat FROM faqcat LEFT JOIN article ON faqcat.cat = article.cat WHERE article.cat Is Null; I vaguley remember MySQL implementing syntax permitting users to remove data from one or more tables. I think this might be your ticket.

Re: Query speed issue

2003-10-02 Thread aguia
What are the configuration you are using? What's the size of your buffers? What's your system? Maybe increasing sort buffer and key buffer will be good. ;) Alexis Quoting Brad Teale [EMAIL PROTECTED]: Hello, The problem: I have the following query with is taking upwards of 2 minutes to

Re: query time of 4294967294 with 4.0.14

2003-10-01 Thread Jeremy Zawodny
On Wed, Oct 01, 2003 at 05:54:25PM -0700, Ask Bjørn Hansen wrote: Hi, Using 4.0.14 on Linux. Often very small queries are reported in processlist and in the slow log to have taken about 136 years. Fortunately they don't really! ;-) I thought it was curious and I didn't see it in the

Re: Query Cache not being used...

2003-09-25 Thread Matt W
Hi Daniel, Yes, query_cache_type is 1 by default if you don't set it. :-) It's not used by default, however, because query_cache_size is 0. You need to set query_cache_size to 16M, 32M, etc. Hope that helps. Matt - Original Message - From: Daniel Kasak Sent: Thursday, September 25,

<    5   6   7   8   9   10   11   12   13   14   >