Help with subqueries...

2006-04-28 Thread Daevid Vincent
vmware reviewit # mysql --version mysql Ver 14.12 Distrib 5.0.19, for pc-linux-gnu (i686) using readline 5.1 Given two tables: CREATE TABLE `logs` ( `id` bigint(20) unsigned NOT NULL auto_increment, `user_id` int(10) unsigned default '0', `created_on` timestamp

Re: Help with subqueries...

2006-04-28 Thread Alex Arul
On 4/28/06, Daevid Vincent [EMAIL PROTECTED] wrote: vmware reviewit # mysql --version mysql Ver 14.12 Distrib 5.0.19, for pc-linux-gnu (i686) using readline 5.1 Given two tables: CREATE TABLE `logs` ( `id` bigint(20) unsigned NOT NULL auto_increment, `user_id`

RE: Help with subqueries... MAX() and GROUP BY

2006-04-28 Thread Daevid Vincent
-Original Message- From: Alex Arul [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 11:28 PM To: Daevid Vincent Cc: mysql@lists.mysql.com Subject: Re: Help with subqueries... On 4/28/06, Daevid Vincent [EMAIL PROTECTED] wrote: vmware reviewit # mysql --version

RE: Help with subqueries... MAX() and GROUP BY

2006-04-28 Thread Daevid Vincent
Thanks Alex, that got me started. I don't understand why I had to use IN when the example uses = but at least it kinda works... The problem is now that I can't get the right data. mysql select max(created_on), user_id, id from logs group by user_id;

Re: HELP --- Slow SP

2006-04-28 Thread Martijn Tonies
CREATE TABLE `his_msisdn_imei_activ_hist` ( `MSISDN` varchar(23) NOT NULL, `ACTIV_IMEI` varchar(20) NOT NULL, `ACTIV_PHONE_TYPE` varchar(100) NOT NULL, `PREV_IMEI` varchar(20) default NULL, `PREV_PHONE_TYPE` varchar(100) default NULL, `ACTIV_TIME` datetime NOT NULL, PRIMARY KEY

~Mysql performance~

2006-04-28 Thread Mohammed Abdul Azeem
Hi, I have 2 mysql servers with version 5.0.15-standard-log running on redhat es4 installed on 2 different geographic locations. The default storage engine used is innodb on both the servers. I run an insert query on both the servers that inserts 25,00,000 records. first server takes 7.5 hrs,

Re: ~Mysql performance~

2006-04-28 Thread living liquid | Christian Meisinger
Hi, I have 2 mysql servers with version 5.0.15-standard-log running on redhat es4 installed on 2 different geographic locations. The default storage engine used is innodb on both the servers. I run an insert query on both the servers that inserts 25,00,000 records. first server takes 7.5

Re: ~Mysql performance~

2006-04-28 Thread Mohammed Abdul Azeem
Hi, The following is the hard disk specs for both the servers: server one: ( whose performance is good ) --- class: HD bus: IDE detached: 0 device: hda driver: ignore desc: ST3200822A physical: 16383/16/63 logical: 24321/255/63 - class: HD bus: IDE detached: 0 device: hdb driver: ignore

Re: ~Mysql performance~

2006-04-28 Thread Mohammed Abdul Azeem
Hi, I would like to make one correction. The server one has 2 IDE hard disks and not SATA hard disks. Thanks, Abdul. On Fri, 2006-04-28 at 16:33 +0530, Mohammed Abdul Azeem wrote: Hi, The following is the hard disk specs for both the servers: server one: ( whose performance is good )

Invitation to find out about Freestateprojects.org and join our mailing list

2006-04-28 Thread Daryl - Freestateprojects.org
Hi. Came across your work and just thought I'd send you this intro email about the Free State Projects as we are looking to make connections! Daryl --- This email is to inform you about http://freestateprojects.org which is the information page for the Free State Projects, South Africa. The

Re: How to select the last entry per item

2006-04-28 Thread Shawn Green
--- Peter Brawley [EMAIL PROTECTED] wrote: Brian Hi, I hope this is the right list for this question. If not, I'm happy to get help on where to post this question. Apologies in advance if this is an old question. We are designing a simple a tracking database with a table of

Re: Import from unknown format (.bdd .ind .mor .ped)

2006-04-28 Thread Remo Tex
http://perso.easynet.fr/cibderf/tout.html HTH Pedro mpa wrote: Greetings. I'm building an application and I need to import data to mysql from a db format I don't know. Unfortunately the person in charge of the data won't be reachable for the next 2 weeks and I want to continue my work.

Re: selecting all records inserted last 1 minutes?

2006-04-28 Thread afan
Nothing' wrong- I just didn't know :) Yup! It works just fine! Thanks Paul for your help! -afan At 22:29 -0500 4/27/06, Afan Pasalic wrote: No, not exactly. More as there is a solution... What would be the best way to do? -afan What's wrong with WHERE last_access = NOW() - INTERVAL 1

Killing MySQL connections on a specific interface from a specific host

2006-04-28 Thread Dominik Klein
Hi I'd like to know if there is anything to kill connections from a specific client ip that came to the server on a specific interface. I do not want to block them on layer 2 (which could easily be done with netfilter), I would like to be able to kill active connections. For example: I would

Re: Killing MySQL connections on a specific interface from a specific host

2006-04-28 Thread Kishore Jalleda
On 4/28/06, Dominik Klein [EMAIL PROTECTED] wrote: Hi I'd like to know if there is anything to kill connections from a specific client ip that came to the server on a specific interface. I do not want to block them on layer 2 (which could easily be done with netfilter), I would like to be able

Best column type for latitude / longitude?

2006-04-28 Thread René Fournier
Just curious the majority use. I've been using decimal(18,14), but that appears bigger than necessary... Maybe varchar(21) for latitude, and varchar(22) for longitude? ...Rene

Quick Replication Question

2006-04-28 Thread Robinson, Eric
When you have master-slave replication enabled, and something goes wrong with one of the tables on the master, and you have to run mysqlcheck -r to fix it, does the fix get written to the binlog and replicated to the slave? --Eric -- MySQL General Mailing List For list archives:

Re: ~Mysql performance~

2006-04-28 Thread Kishore Jalleda
On 4/28/06, Mohammed Abdul Azeem [EMAIL PROTECTED] wrote: Hi, I have 2 mysql servers with version 5.0.15-standard-log running on redhat es4 installed on 2 different geographic locations. The default storage engine used is innodb on both the servers. I run an insert query on both the servers

Re: Quick Replication Question

2006-04-28 Thread Jeremiah Gowdy
no. - Original Message - From: Robinson, Eric [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, April 28, 2006 8:51 AM Subject: Quick Replication Question When you have master-slave replication enabled, and something goes wrong with one of the tables on the master, and you

Matching Different Tables' Columns and Rows

2006-04-28 Thread -Patrick
Hi, I am having the toughest time accomplishing this. I am asking for any examples or links to info pertaining to this as I want to make an effort before posting any code. After matching the specific rows by an identifying column between two tables.. I can manipulate some data albeit on a minor

Re: How to select the last entry per item

2006-04-28 Thread Peter Brawley
Shawn, Yep that's the theory, but where (i) the aggregate result is a column value, rather than a sum or average for example, and (ii) id is unique, I have not been able to get MySQL to give a wrong second_col value with that approach, eg try the following with the northwind database (it

Re: How to select the last entry per item

2006-04-28 Thread Peter Brawley
LOL, three late nights in a row, lose that last post o' mine. PB - Shawn Green wrote: --- Peter Brawley [EMAIL PROTECTED] wrote: Brian Hi, I hope this is the right list for this question. If not, I'm happy to get help on where to post this question.

Matching Different Tables' Columns and Rows

2006-04-28 Thread -Patrick
Basically, I want to match specific rows with ONLY a specific date. Here's the code: mysql_select_db($database_connBlog, $connBlog); $query_FindArticleDates = SELECT * FROM blg_article_art, blg_topic_top WHERE blg_article_art.idtop_art = blg_topic_top.id_top; $findArticleDates =

MySQL PHP Connector

2006-04-28 Thread Krisno Hasan
Could you give me MySQL PHP Connector, both mysql and mysqli connectors version 5.0.18? Thanks.

Re: How to select the last entry per item

2006-04-28 Thread Peter Brawley
Here are the queries which illustrate Shawn's point. Now to sleep. -- wrong DROP TABLE IF EXISTS o1; CREATE TABLE o1 SELECT customerid,shipcity,MAX(shippeddate) AS latest FROM orders GROUP BY customerid; -- right DROP TABLE IF EXISTS o2; CREATE TABLE o2 SELECT DISTINCT

Re: ~Mysql performance~

2006-04-28 Thread Atle Veka
On Fri, 28 Apr 2006, Mohammed Abdul Azeem wrote: Hi, I have 2 mysql servers with version 5.0.15-standard-log running on redhat es4 installed on 2 different geographic locations. The default storage engine used is innodb on both the servers. I run an insert query on both the servers that

Streaming LOB Data

2006-04-28 Thread Robert DiFalco
It appears (for InnoDB at least) that while INSERTing a LOB that all LOB data must be loaded into memory before it is written to disk. Or is it just the size of the combined log files? Looking at Task Manager, it looks like it DOES try to load the whole thing into memory before streaming it to

RE: Help with subqueries... MAX() and GROUP BY [sovled]

2006-04-28 Thread Daevid Vincent
Well I think this is mostly working. I have a 'NULL' user ID which is 'system' that I need to get into here, but I think I'm mostly on track... There are lots of ways to accomplish this task it seems. ALL of which would be so much easier if mySQL would just return all the data from the same MAX()

Re: Can I select from remote tables in mysql 5.0.18-standard-log?

2006-04-28 Thread P. Evans
Thanks all, this looks exactly like what i'm looking for. However, when I create the federated table, it says it was successful but creates the table as Myisam. CREATE TABLE `petestdb.backup_pp_line_code` ( `catalog_id` int(10) unsigned NOT NULL, `line_code` char(3) NOT NULL,

RE: Help with subqueries... MAX() and GROUP BY

2006-04-28 Thread Pat Adams
On Fri, 2006-04-28 at 00:13 -0700, Daevid Vincent wrote: The problem is now that I can't get the right data. mysql select max(created_on), user_id, id from logs group by user_id; +-+-++ | max(created_on) | user_id | id |

Re: Can I select from remote tables in mysql 5.0.18-standard-log?

2006-04-28 Thread Kishore Jalleda
On 4/28/06, P. Evans [EMAIL PROTECTED] wrote: Thanks all, this looks exactly like what i'm looking for. However, when I create the federated table, it says it was successful but creates the table as Myisam. CREATE TABLE `petestdb.backup_pp_line_code` ( `catalog_id` int(10) unsigned NOT

RE: Quick Replication Question

2006-04-28 Thread Robinson, Eric
Okay, so that is not too encouraging. Is there any way to find out what mysqkcheck did so it can be manually applied to the slave? Or is mysqlcheck not the best way to fix things when you are using replication? -Original Message- From: Jeremiah Gowdy [mailto:[EMAIL PROTECTED] Sent:

Matching fields from two different tables

2006-04-28 Thread -Patrick
Folks, I could really use your assistance. Take a look here: http://pastebin.com/687889 How can I manipulate totalRows_numberComments so that I get the number of blg_comment_com.idart_com PER blg_article_art.id_art? Right now, it produces every blg_comment_com.idart_com in existence, definately

Re: [PHP] Possible?

2006-04-28 Thread John Hicks
René Fournier wrote: Simple problem: Many client apps need to send data to a server. By default each client will open a persistent TCP socket connection to a common IP address:port (10.10.10.10:1234) and write to it (which the server will save/log, etc.). My question is, what should be

Timeseries

2006-04-28 Thread David Lindelöf
Hello, Is there an easy way to get the last timestamped record not later than a given date/time? I record data for a scientific application and I do not sample my data at a given, fixed frequency. Instead, whenever a physical value changes beyond a given threshold, I get a new timestamped value

Re: Matching fields from two different tables

2006-04-28 Thread John Hicks
-Patrick wrote: Folks, I could really use your assistance. Take a look here: http://pastebin.com/687889 How can I manipulate totalRows_numberComments so that I get the number of blg_comment_com.idart_com PER blg_article_art.id_art? Right now, it produces every blg_comment_com.idart_com in

Re: Matching fields from two different tables

2006-04-28 Thread -Patrick
John Hicks wrote: -Patrick wrote: Folks, I could really use your assistance. Take a look here: http://pastebin.com/687889 How can I manipulate totalRows_numberComments so that I get the number of blg_comment_com.idart_com PER blg_article_art.id_art? Right now, it produces every

Re: Timeseries

2006-04-28 Thread Dan Nelson
In the last episode (Apr 29), David Lindelf said: Is there an easy way to get the last timestamped record not later than a given date/time? I record data for a scientific application and I do not sample my data at a given, fixed frequency. Instead, whenever a physical value changes beyond a

Re: Matching fields from two different tables

2006-04-28 Thread John Hicks
-Patrick wrote: John Hicks wrote: -Patrick wrote: Folks, I could really use your assistance. Take a look here: http://pastebin.com/687889 How can I manipulate totalRows_numberComments so that I get the number of blg_comment_com.idart_com PER blg_article_art.id_art? Right now, it produces