Re: Finding Most Recent Record for Sensor Problem Solved

2004-03-08 Thread Michael Stassen
Did anyone refer you to the following page in the manual? Your proposed solution seems equivalent to the 2nd of the 3 solutions given there. Michael Tim McDonough wrote: The other day I was looking for a way to find only the

RE: Using GREATEST with DATETIME/TIMESTAMP values

2004-03-08 Thread Lance Lovette
>From what I can tell no coercion is necessary when the query references only DATETIME and TIMESTAMP columns but when the query includes literals you don't get the correct results unless you format the dates. Take for example a table with a DATETIME column (DT) and a TIMESTAMP column (TS). The foll

Email link from Perl script to update MySQL?

2004-03-08 Thread Bob Afifi
I'd like to modify the email send I presently get from the Perl script when a new record is submitted from the form to contain an email link which if I click on it, will update MySQL. Anybody know how that might best be done and if so, can you please advise? Many thanks in advance, -Bob __

Re: Reversing the group...

2004-03-08 Thread Garth Webb
On Mon, 2004-03-08 at 15:52, David Scott wrote: > OK, here is a problem that has been bugging me for some time. > > If I have a table like this, showing 3 visitors to a website and the pages they > view > > idvisitorIDpageID > 113 > 214 > 3

Fw: Reversing the group...

2004-03-08 Thread David Scott
Putting it simply, I want the last record from the group, not the default first. Cheers -- Dave - Original Message - From: "David Scott" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 08, 2004 11:52 PM Subject: Reversing the group... OK, here is a problem that has been

Reversing the group...

2004-03-08 Thread David Scott
OK, here is a problem that has been bugging me for some time. If I have a table like this, showing 3 visitors to a website and the pages they view idvisitorIDpageID 113 214 312 423 524

RE: "Can't create thread"

2004-03-08 Thread Donny Simonton
Michael, Add this to you're my.cnf and then restart mysql. See if that solves your problem. open-files-limit=36864 Donny > -Original Message- > From: Michael Bacarella [mailto:[EMAIL PROTECTED] > Sent: Monday, March 08, 2004 4:52 PM > To: [EMAIL PROTECTED] > Subject: Re: "Can't create t

RE: SQ puzzle

2004-03-08 Thread Mike Brando
> > Of course the problem cannot be solved with M$ SQLServer :-) And why pray tell is that? I suppose if Vladimir and wife were very prolific then (4, 3, 3) will also work, which is 10 windows on the building, not 13 (9, 2, 2) I also happen to be one of those who have two children about 11 mon

Re: transactions

2004-03-08 Thread andrebras
hi there, i'm using two different database objects, for each connection. i still haven't tried with save points, but i will, to see what append. regards, andré Citando Heikki Tuuri <[EMAIL PROTECTED]>: > Andre, > > - Original Message - > From: <[EMAIL PROTECTED]> > Newsgroups: mailing.d

Re: "Can't create thread"

2004-03-08 Thread Michael Bacarella
> > We recently started getting "Can't create thread" errors since > > switching to Debian. > > > > On Red Hat 8.0 we were able to spawn more than 400 mysql threads > > and never encountered this error. mysql 3.23.56 compiled from > > source, stock kernel. (2GB of RAM) > > > > Now we get it all

Re: "Can't create thread"

2004-03-08 Thread Sasha Pachev
Michael Bacarella wrote: We recently started getting "Can't create thread" errors since switching to Debian. On Red Hat 8.0 we were able to spawn more than 400 mysql threads and never encountered this error. mysql 3.23.56 compiled from source, stock kernel. (2GB of RAM) Now we get it all the time

Join Locked Tables ?

2004-03-08 Thread Lianghwa Jou
Hi, Mysql seems to insists that all tables must be locked if one table is locked in a select statement. Why ? For example- lock tables A WRITE, B WRITE; select * from A, B, C where A.id=B.id and A.id=C.id; Mysql will complain that table C is not locked. Is there a way to avoid locking table C

Finding Most Recent Record for Sensor Problem Solved

2004-03-08 Thread Tim McDonough
The other day I was looking for a way to find only the most recent piece of data stored in a historical database of 40 sensors. Thanks for all the helpful suggestions. While no one suggested a fully working solution the suggestions got me pointed in the right direction. In case anyone might be lurk

Re: ORDER BY RAND() performance

2004-03-08 Thread Sasha Pachev
Donny Simonton wrote: Neil, We never delete from primary tables. No questions asked! We would just mark a entry as deleted, and not select from it. Another option you can do to solve your deletion problem is, select 35 rows for example, when you really only want 30. That way, you can have extras

"Can't create thread"

2004-03-08 Thread Michael Bacarella
We recently started getting "Can't create thread" errors since switching to Debian. On Red Hat 8.0 we were able to spawn more than 400 mysql threads and never encountered this error. mysql 3.23.56 compiled from source, stock kernel. (2GB of RAM) Now we get it all the time on Debian and the MySQ

Re: ORDER BY RAND() performance

2004-03-08 Thread Neil Gunton
Donny Simonton wrote: > > Neil, > We never delete from primary tables. No questions asked! We would just > mark a entry as deleted, and not select from it. > > Another option you can do to solve your deletion problem is, select 35 rows > for example, when you really only want 30. That way, you

RE: ORDER BY RAND() performance

2004-03-08 Thread Donny Simonton
Neil, We never delete from primary tables. No questions asked! We would just mark a entry as deleted, and not select from it. Another option you can do to solve your deletion problem is, select 35 rows for example, when you really only want 30. That way, you can have extras, if say #20 is not a

Re: ORDER BY RAND() performance

2004-03-08 Thread Neil Gunton
Donny Simonton wrote: > One other option that we use > sometimes is say you need 30 results randomized, and you have an > auto-increment in your table. Create 30 random numbers, then do a select > with something like this: > > Select * from blabla where lkajsdlkjas IN (10, 43, 22, 8981, etc...) >

Re: SQ puzzle

2004-03-08 Thread Sasha Pachev
[EMAIL PROTECTED] wrote: It is interesting to see the various solutions being proposed. Though one item missing is the inclusion of a 1 year old child. It is likely this will be the telling point since it provides one of the possible limiting criteria not mentioned. Most buildings have an ev

Re: ORDER BY RAND() performance

2004-03-08 Thread Neil Gunton
Ray wrote: > an alternative to the order by rand() with large record sets is to > pick a random starting point "limit $randPoint, 30" don't know if > its a viable solution to your situation, but it limits you to 2 > querys (row count, fetch) rather then the 30 (fetch 1 x 30) Thanks! I did see thi

RE: ORDER BY RAND() performance

2004-03-08 Thread Donny Simonton
Exactly, it's faster for us to pull all of the data and then randomize it locally. We have benchmarked it both ways and the local randomize was faster. Now that's if you want multiple records returned. Now if you only want one record, what we do, is create a random number, and then just do a lim

Re: ORDER BY RAND() performance

2004-03-08 Thread Ray
On Monday 08 March 2004 14:14, Neil Gunton wrote: > [EMAIL PROTECTED] wrote: > > If your infact (sounds like) storing the pictures meta-data > > (name, size, owner, etc) and the data (blob of some kind) .. I > > would definately break up the design into 2 tables. That way > > when dealing with the

RE: ORDER BY RAND() performance

2004-03-08 Thread colbey
Donny, what do you do? Throw all the values into an array or something on the client side, and use a random number generator to pull out the array elements? I suppose (depending on resultset size) pulling that many rows from server to client and handing on client side could be faster... On

Community Contributor Discount for the 2004 MySQL User Conference

2004-03-08 Thread Zak Greant
Greetings All, As promised a few weeks ago (but only delivered today), MySQL is offering a $100 discount on the MySQL 2004 User Conference conference fee for attendees who contribute to the Free and Open Source Software commons. The purpose of this discount is both to reward people for their w

RE: ORDER BY RAND() performance

2004-03-08 Thread Donny Simonton
ORDER BY RAND(), just sucks in my opinion. We have created our own internal randomization system because pretty much everytime you use it will show up in the slow query log, because of the using temporary, using filesort it does. Splitting your data into a hundred tables will still make it "using

Re: ORDER BY RAND() performance

2004-03-08 Thread Neil Gunton
[EMAIL PROTECTED] wrote: > > If your infact (sounds like) storing the pictures meta-data (name, size, > owner, etc) and the data (blob of some kind) .. I would definately break > up the design into 2 tables. That way when dealing with the meta-data > table (your RAND() query) there is much less d

Re: ORDER BY RAND() performance

2004-03-08 Thread colbey
If your infact (sounds like) storing the pictures meta-data (name, size, owner, etc) and the data (blob of some kind) .. I would definately break up the design into 2 tables. That way when dealing with the meta-data table (your RAND() query) there is much less data that needs to be traversed to g

Re: One thread takes over the whole server

2004-03-08 Thread Egor Egorov
[EMAIL PROTECTED] wrote: > Hi > > I need to prevent users from holding down the server,issuing the next > query the server becomes so slow that the other clients can't even login!, > the tables are around 6Million records: > > SELECT (some fields ), sum(more fields) AS calcfield > FROM table1

Windows bug with ALTER TABLE and LOCK

2004-03-08 Thread Seth Seeger
I have been experiencing a small problem with altering a table, once it has been locked. If you alter a table (adding a column) while that table is locked, subsequent calls to that table result in MySQL erroring, saying the table was not locked. I have reproduced this under Windows 2000, running

mysql unexpectedly dying

2004-03-08 Thread Ian Pushee
I am running mysql version 3.23.49 on a Debian Linux box. Recently (about a month ago) I noticed that alot of my databse access scripts were failing intermitently. It was anoying, but I have only now gotten the time to look into the problem. It turns out that my mysql server processes are dying

One thread takes over the whole server

2004-03-08 Thread andres
Hi I need to prevent users from holding down the server,issuing the next query the server becomes so slow that the other clients can't even login!, the tables are around 6Million records: SELECT (some fields ), sum(more fields) AS calcfield FROM table1 INNER JOIN table2 ON ... INNER JOIN ta

Re: SQ puzzle

2004-03-08 Thread beacker
It is interesting to see the various solutions being proposed. Though one item missing is the inclusion of a 1 year old child. It is likely this will be the telling point since it provides one of the possible limiting criteria not mentioned. Most buildings have an even number of windows. So

Re: locking issues

2004-03-08 Thread Egor Egorov
Hans van Dalen <[EMAIL PROTECTED]> wrote: > > A question about locking. In my code (delphi but that doesn't much matter) > I fire ad-hoc queries (select). Before the query i fire a locking query > (read) for that particular tables. Something like this: > > lock tables tab1 a read, tab2 b read >

ORDER BY RAND() performance

2004-03-08 Thread Neil Gunton
Hi all, I am using MySQL 4.0.x to run a community website which has (among other things) over 19,000 pictures. There is a page that selects 30 random thumbnails. I have noticed that the performance of "ORDER BY RAND()" on this table has a significant impact on performace. I have all the relevant i

Re: Replication and "replace delayed"

2004-03-08 Thread Sasha Pachev
Hans Svedåker wrote: Hi I have a problem with replication and "replace delayed" statements. They generate this error on the slave machine a couple of times every night (When there are high load on the master). Anyone that has any suggestions? Why does this error occur. Last_errno: 1053 Last_er

Re: Relationship between libz and libmysqlclient libraries

2004-03-08 Thread John Ling
Paul DuBois wrote: At 14:17 -0800 3/5/04, John Ling wrote: I notice that, while building C applications that use the libmysqlclient library, I sometimes need to link with libz library, depending on which system I am compiling on. The different systems have different mysql versions installed, s

Re: SQ puzzle

2004-03-08 Thread Sasha Pachev
- It's not very common that the same mother has had two children (not twins) within 12 months. Besides, only during a limited timeframe the ages in years of two such children would be the same. It is possible, and actually is not that uncommon where I live (Utah) - my wife and I have a few friend

AW: max used connections question

2004-03-08 Thread Freddie Sorensen
Dean It is the number of concurrent connections They disappear either when they are closed by the application which has opened them, or when wait_timeout expires for inactive connections The wait_timeout is by default at 28800 seconds, so it will take quite a long time before they disappear (did

Reducing to CNF - Conjuntive Normal Form

2004-03-08 Thread Roberto Slepetys Ferreira
Hi, I am construction a Full Text Search engine replacing the internal MySQL engine in an experiment for index all the content of neswspaper's 20 years of publications , and the first layer to do a search is to convert the Boolean Phrase entered by the user to a CNF (conjuntive normal form). I su

Re: Replication broken after upgrade from 4 to 4.1

2004-03-08 Thread Stefan Kuhn
Just for the records: The reason was a misconfiguration in the firewall. The admin had changed the setting in the very moment I upgraded from 4.0 to 4.1 ... that lead me to the assumption broken replication had to do with the upgrade. Took me a while till I found it's firewall problem. Thanks, S

Re: semaphore.h: incomplete type

2004-03-08 Thread Sasha Pachev
Justin Camp wrote: Greetings! I'm having a bit of a problem compiling mysql, that I've been chewing on for more than a week now.. I'd preferably like to use the pre-built binaries, but the tared binary packages don't come with the shared libraries, and the RPM's can't be moved to different pre

Re: InnoDB tables using 90% cpu

2004-03-08 Thread Sasha Pachev
Cliff wrote: Hi, I have a whole database I wanted to convert to InnoDB from MyISAM, but do not want to use alter table because of the problems I had last time. I made a whole dump of the table using mysqldump and changed all of the table create definitions from MyISAM to InnoDB. Theoretically this

Re: Need a better index on this multiple join?

2004-03-08 Thread Sasha Pachev
--- results for EXPLAIN --- articles | ALL | PRIMARY | NULL | NULL | NULL | 25818 | where used; Using temporary; Using filesort | stats | ref | vdate,article_id,v_a | article_id | 4 | articles.

Re: Problems with Mysql 4.0.15+Tomcat 4.0

2004-03-08 Thread Sasha Pachev
Abubakr wrote: Hi, i m using mysql 4.0.15 and tomcat 4 as a webserver on linux 8 machine, now the problem that i am facing is that while testing my web application when i send too many refresh requests to the web page, the server's CPU utilization reaches to 100% for a very long duration of

Re: Can my.cnf actually lessen performance?

2004-03-08 Thread Sasha Pachev
Scott Haneda wrote: OS X 10.3 and mysql 4.x, I have a situation where after time certain queries get really slow, in the area of 30 seconds. I seem to have pinned it down to my use of my-large.cnf. If I remove this file and let just the mysql defaults in, then I seem to not have the trouble, at l

Re: slave hotbackup question

2004-03-08 Thread Heikki Tuuri
Mark, - Alkuperäinen viesti - Lähettäjä: "Mark Steele" <[EMAIL PROTECTED]> Vastaanottaja: "'Heikki Tuuri'" <[EMAIL PROTECTED]> Kopio: <[EMAIL PROTECTED]> Lähetetty: Monday, March 08, 2004 6:25 PM Aihe: RE: slave hotbackup question > Heikki, > > So if I understand this correctly, the fol

4.0.15 replication failure ('Event too big')

2004-03-08 Thread Mark Swanson
Hello, I am having replication troubles with 4.0.15. Some info: mysql> show slave status; | www.x.com | replicon| 3306| 60| ns1-bin.001 | 16958428| linux-relay-bin.011 | 623915| ns1-bin.001 | Yes | No|

RE: slave hotbackup question

2004-03-08 Thread Mark Steele
Heikki, So if I understand this correctly, the following procedure could be used to create a hot backup from a slave which could be used to create a new slave server: 1) Create a hot backup of the innodb tables on theslave with ibbackup (with --suspend-at-end) 2) Create a hot backup of the MyISAM

Re: SQ puzzle

2004-03-08 Thread Brent Baisley
That depends on your nationality. Two children born in the same year are commonly called Irish twins. But that's even more off topic. On Mar 8, 2004, at 5:59 AM, Jigal van Hemert wrote: - It's not very common that the same mother has had two children (not twins) within 12 months. -- Brent Baisl

max used connections question

2004-03-08 Thread Rochester, Dean
Does this number indicate the current number of connections or the max number of connections during the current uptime? We have this number max set to 200 from the default 100 how does this number go down during uptime? It hovers around 30 - 40 but sometimes goes to 90 But it does not seem to

Re: Re: Selectinmg most recent dates from multiple table items

2004-03-08 Thread Tim McDonough
--- Original Message --- From: "Joshua J. Kugler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sun, 07 Mar 2004 04:57:30 -0900 Subject: Re: Selectinmg most recent dates from multiple table items > SELECT DISTINCT sensor_id, other_fields FROM table_name > ORDER BY time_stamp_field DESC LIMIT

TEST EMAIL - Disregard

2004-03-08 Thread Kevin Carpenter
TEST EMAIL - Disregard -:>Kevin Carpenter CHOP - Biomedical Engineering (215) 590-5762 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Replication and "replace delayed"

2004-03-08 Thread Hans Svedåker
Hi I have a problem with replication and "replace delayed" statements. They generate this error on the slave machine a couple of times every night (When there are high load on the master). Anyone that has any suggestions? Why does this error occur. Last_errno: 1053 Last_error: query 'REPLACE D

Re: SQ puzzle

2004-03-08 Thread Jigal van Hemert
> >- have only one highest age (since there is an "eldest") > >Looking at the output this would only be true for ages 9, 2 and 2 > > Yes but 6,6,1 doesn't necessarily mean that the two children > aged 6 are twins - one could have been born in January and one > in December in the same year and hence

Re: SQ puzzle

2004-03-08 Thread Peter Burden
Jigal van Hemert wrote: Table: CREATE TABLE `age1` ( `age1` tinyint(2) NOT NULL auto_increment, PRIMARY KEY (`age1`) ) TYPE=MyISAM AUTO_INCREMENT=21 ; Data: INSERT INTO `age1` VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11), (12), (13), (14), (15), (16), (17), (18), (19), (20); Q

Re: InnoDB: Assertion failure in file row0upd.c line 713

2004-03-08 Thread Egor Egorov
Jon Thingvold <[EMAIL PROTECTED]> wrote: >>Description: >>From error.log: > > 040308 9:34:00 InnoDB: Assertion failure in thread 13835301 in file row0upd.c line > 713 > InnoDB: Failing assertion: len == dfield_get_len(dfield) > InnoDB: We intentionally generate a memory trap. > InnoDB: Send a d

Re: SQ puzzle

2004-03-08 Thread Jigal van Hemert
Table: CREATE TABLE `age1` ( `age1` tinyint(2) NOT NULL auto_increment, PRIMARY KEY (`age1`) ) TYPE=MyISAM AUTO_INCREMENT=21 ; Data: INSERT INTO `age1` VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11), (12), (13), (14), (15), (16), (17), (18), (19), (20); Query: SELECT * , a.

Re: Using GREATEST with DATETIME/TIMESTAMP values

2004-03-08 Thread Egor Egorov
"Lance Lovette" <[EMAIL PROTECTED]> wrote: > What is the best or most efficient way to compare a mix of DATETIME and > TIMESTAMP values using GREATEST()? Some values are columns and some are > literals. Should I convert TIMESTAMP values to DATETIME formatted strings > using DATE_FORMAT or convert e

Re: Hitting max_connections - safe to raise this?

2004-03-08 Thread Alex Greg
> Alex Greg wrote: > > Hi, > > > > > > Our main database server is a 2 x PIII 1.2Ghz with 1.5GB RAM and a 73GB SCSI > > RAID-5 made up of 3 36GB disks. It does between 300 and > > 1200 queries per second. The read to write ratio is about 4:1. > > > > > > My problem is that we're hitting our max_co

InnoDB: Assertion failure in file row0upd.c line 713

2004-03-08 Thread Jon Thingvold
>Description: >From error.log: 040308 9:34:00 InnoDB: Assertion failure in thread 13835301 in file row0upd.c line 713 InnoDB: Failing assertion: len == dfield_get_len(dfield) InnoDB: We intentionally generate a memory trap. InnoDB: Send a detailed bug report to [EMAIL PROTECTED] mysqld got sign

semaphore.h: incomplete type

2004-03-08 Thread Justin Camp
Greetings! I'm having a bit of a problem compiling mysql, that I've been chewing on for more than a week now.. I'd preferably like to use the pre-built binaries, but the tared binary packages don't come with the shared libraries, and the RPM's can't be moved to different prefixes, so I usuall

SQ puzzle

2004-03-08 Thread Tom Roos
SQL puzzle from the Informix mailing list: Two mathematicians (Boris and Vladimir) met accidently for the first time in 20 years. They greet each other and begin catching up on their respective lives. Boris asks Vladi "Do you have any children?" "Yes" replies Vladimir, "I have three." "How o

Re: Timestamp and alter table

2004-03-08 Thread Batara Kesuma
> I want to change the column choose to ENUM('y', 'n', 'weekly') without > changing the timestamp. How can I do that? I tried ALTER TABLE as usual, and it didn't affect the timestamp. Sorry I didn't try this from the beginning :) --Batara -- MySQL General Mailing List For list archives: http: