Re: Aborted connects

2008-10-24 Thread Moon's Father
This is because either somebody is attacking your mysqld or your variable named connect_timeout is very lower. On Wed, Oct 22, 2008 at 9:55 PM, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote: Hi list, Aborted clients and connects are increasing very fast. Aborted_clients 4934

Re: super-smack on mysql 5.0 solaris 10 x86_64

2008-10-24 Thread Moon's Father
Maybe you should set your old_passwords = on. On Fri, Oct 17, 2008 at 4:36 PM, Sudhir Menon [EMAIL PROTECTED] wrote: Hi Ujang I could reproduce the same error mentioned by you in the actual post even after having all of the packages for MySQL. Figuring out the what could be the problem .

archive mysql data

2008-10-24 Thread Ujang Jaenudin
dear all, I need your direction about archiving mysql data. the scenario is: mysql on host A with dbname DB1 has the INSERT 90% and select 10% activities. mysql on host B with dbname DB2 as an archiver database of DB1 database. on DB1 the data will be purged daily on midnight. I need all the

Re: MyQuery 2.3 Beta available for download

2008-10-24 Thread Moon's Father
It's very nice! But it's too simple. On Mon, Oct 6, 2008 at 12:26 AM, Anders Karlsson [EMAIL PROTECTED] wrote: Sorry for crossposting, but I think this is relevant both th general MySQL and specifically to Win32 users. MyQuery 2.3 has a lot of new features, a few bugfixes and some other

Re: Joining subqueries

2008-10-24 Thread Moon's Father
mrc_titles is a temp table? On Wed, Oct 15, 2008 at 11:59 PM, Jerry Schwartz [EMAIL PROTECTED] wrote: I tried to make a query that joins to subqueries: SELECT discontinued.b FROM (SELECT mrc_titles.title AS a FROM mrc_titles JOIN prod ON mrc_titles.title =

Re: simple design choice

2008-10-24 Thread Moon's Father
If you want to choose the first one, then the flag' data type must be enum.For int fill the disk with 4 byte and enum just 1 byte. On Sat, Oct 4, 2008 at 2:15 AM, Alex K [EMAIL PROTECTED] wrote: That seems like a nice trick. I suppose the flag would just be an int and not an enum in this case.

Re: Master-master setup

2008-10-24 Thread Moon's Father
There're an article about master to master replication at my blog. On Thu, Oct 9, 2008 at 3:45 PM, Simon J Mudd [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Carl) writes: I am running 5.0.24a on Slackware Linux. I would like to set up a master-master replication process so that I can use

Most efficient way of handling a large dataset

2008-10-24 Thread Mark Goodge
I'd appreciate some advice on how best to handle a biggish dataset consisting of around 5 million lines. At the moment, I have a single table consisting of four fields and one primary key: partcode varchar(20) region varchar(10) location varchar(50) qty int(11) PRIMARY KEY (partcode, region,

Re: Most efficient way of handling a large dataset

2008-10-24 Thread Jim Lyons
You might consider adding qty to the index and have so your queries would be satisfied with the index lookup alone, saving an extra step since the database won't then go access the data (just the one field, qty). You might also consider making all field non-null and, if you keep the fields as

Re: ORDER BY Help

2008-10-24 Thread Olexandr Melnyk
SELECT ProductName FROM Products WHERE ProductScore 100 ORDER BY CASE WHEN ProductScore = 125 THEN 0 ELSE 1 END, ProductScore But this query won't use an index, so it would be a good idea to do this in two queries 2008/10/24 Tompkins Neil [EMAIL PROTECTED] Hi I've the following basic

ORDER BY Help

2008-10-24 Thread Tompkins Neil
Hi I've the following basic query like SELECT ProductName FROM Products WHERE ProductScore 100 ORDER BY ProductScore However, how can I order by ProductScore, but ensure the product with ID 125 is at the top ? Is this possible. Thanks Neil

Re: Most efficient way of handling a large dataset

2008-10-24 Thread Brent Baisley
On Fri, Oct 24, 2008 at 6:59 AM, Mark Goodge [EMAIL PROTECTED] wrote: I'd appreciate some advice on how best to handle a biggish dataset consisting of around 5 million lines. At the moment, I have a single table consisting of four fields and one primary key: partcode varchar(20) region

Re: ORDER BY Help

2008-10-24 Thread Tompkins Neil
Following on from my email below I now need help with the following problem. Here is a list of my sample data Date ProductID ProductNameProductScore Quantity 2008-11-10100 Red Light 0.05 10 2008-11-11100

Re: ORDER BY Help

2008-10-24 Thread Olexandr Melnyk
SELECT ProductID, ProductName, AVG(ProductScore * Quantity) AS a FROM Products GROUP BY ProductID ORDER BY a DESC 2008/10/24, Tompkins Neil [EMAIL PROTECTED]: Following on from my email below I now need help with the following problem. Here is a list of my sample data Date

Re: ORDER BY Help

2008-10-24 Thread Tompkins Neil
Hi This works, however I still want to be able to list the whole list like because I need to display it on the screen, but in the ordered together i.e all RedLights, all BlueLights etc a Date ProductID ProductName ProductScore Quantity %

Re: ORDER BY Help

2008-10-24 Thread Olexandr Melnyk
Could give us sample values for a field? Should it contain the same thing as in the query I've sent? 2008/10/24, Tompkins Neil [EMAIL PROTECTED]: Hi This works, however I still want to be able to list the whole list like because I need to display it on the screen, but in the ordered together

Re: ORDER BY Help

2008-10-24 Thread Tompkins Neil
Hi Thanks for your quick reply. The sample value for a would be like a average of integer. e.g 6.01, or 10.19. Neil On Fri, Oct 24, 2008 at 2:49 PM, Olexandr Melnyk [EMAIL PROTECTED] wrote: Could give us sample values for a field? Should it contain the same thing as in the query I've sent?

Re: ORDER BY Help

2008-10-24 Thread Olexandr Melnyk
Still doesn't make much sense to me. Could you show us how to calculate it for some of the rows above? 2008/10/24, Tompkins Neil [EMAIL PROTECTED]: Hi Thanks for your quick reply. The sample value for a would be like a average of integer. e.g 6.01, or 10.19. Neil On Fri, Oct 24, 2008 at

Re: ORDER BY Help

2008-10-24 Thread Tompkins Neil
Hi Basically from the query below, it would only return one product like RedLight. But I need to return a list of all products, ordered by a SELECT ProductID, ProductName, AVG(ProductScore * Quantity) AS a FROM Products GROUP BY ProductID ORDER BY a DESC On Fri, Oct 24, 2008 at 2:53 PM,

Re: Stopping DNS Lookups

2008-10-24 Thread Richard S. Huntrods
Yes, that's exactly what the link from Hassan said to do. Interestingly, what is not stated in that link is that you must add entries in mysql tables 'db' and 'user' for '127.0.0.1' (a.k.a. 'localhost') if you need to access the database from the local server. Remote access via static IP

Re: which solution is better for $count and @cols

2008-10-24 Thread Perrin Harkins
On Thu, Oct 23, 2008 at 10:31 PM, Fayland Lam [EMAIL PROTECTED] wrote: B one SQLs with some operation SELECT col FROM table WHERE $where while $count is scalar @cols and real cols is splice(@cols, $start, $rows) If you're talking about Perl/DBI, doing that normally loads the entire result set

Re: Stopping DNS Lookups

2008-10-24 Thread Richard S. Huntrods
Not on my testing system (Win-XP). I test on Win-XP but deploy on Unix. Not only that, but the production application servers are separate from the database server, so I never use localhost in production anyway. But on the XP test server, I had to add the 127.0.0.1 entries to 'db' and 'user'

Re: Most efficient way of handling a large dataset

2008-10-24 Thread Joerg Bruehe
Hi Mark, all! Mark Goodge wrote: I'd appreciate some advice on how best to handle a biggish dataset consisting of around 5 million lines. At the moment, I have a single table consisting of four fields and one primary key: partcode varchar(20) region varchar(10) location varchar(50) qty

auto_increment problem

2008-10-24 Thread Paul
Anybody know if there's a way to change a primary key field that is not auto-incremented, turning on auto-increment but preserving the values that are currently in it? TIA, Paul W -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

How to count # of character occurrences in a string?

2008-10-24 Thread mos
I have a Char column with text data like ab:cdef:h and I'd like to count the number of : in the column. I can't find an easy way to do it. I thought there should be a MySQL function to do this. Any suggestions? TIA Mike -- MySQL General Mailing List For list archives:

Re: How to count # of character occurrences in a string?

2008-10-24 Thread Pintér Tibor
I have a Char column with text data like ab:cdef:h and I'd like to count the number of : in the column. I can't find an easy way to do it. I thought there should be a MySQL function to do this. Any suggestions? select length('aa:bb:cc:dd')-length(replace('aa:bb:cc:dd',':','')); btw ever

Re: How to count # of character occurrences in a string?

2008-10-24 Thread Jim Lyons
A quick and dirty way would be to use an expression like length(x) - length(replace(x, :, )) Here's some code that I actually ran: set @x = aa:bb:cc:dd; set @colons = length(@x) - length(replace(@x, :, )); select @x , @colons; On Fri, Oct 24, 2008 at 5:16 PM, mos [EMAIL PROTECTED] wrote:

Re: mysqld, mysqld-nt, mysqld-debug

2008-10-24 Thread Moon's Father
Hi. I think you had a mistake for the server types.Mysql-nt.exe is the only exexutable program on windows.So you just pay close attention about it. On Mon, Oct 6, 2008 at 8:35 PM, Steven [EMAIL PROTECTED] wrote: Steve (n) Martin! if you want apache and mysql (and possibly PHP for

Re: mysqldump: Error 5: Out of memory

2008-10-24 Thread Moon's Father
Show the details of your hardware us. On Thu, Oct 2, 2008 at 3:02 PM, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote: Hi, Just try the below command on console. It will give that the error is exactly related to what. $perror 5 What is total ram in your box. On Thu, Oct 2, 2008 at

Re: Speed up slow SQL statement.

2008-10-24 Thread Moon's Father
You may see the section named group by optimization on the document. On Tue, Sep 30, 2008 at 4:44 AM, Rob Wultsch [EMAIL PROTECTED] wrote: Glancing over things I suggest: ALTER TABLE browse_nodes_to_products ADD INDEX(browse_node_id,product_id); (if product_id has greater cardinality put

Re: MySQL 5.1 Function Creation

2008-10-24 Thread Moon's Father
Make sure your log_bin_trust_function_creator is on. On Sun, Sep 28, 2008 at 3:04 AM, Jesse [EMAIL PROTECTED] wrote: I'm trying to use existing functions from a restored database from 5.0xx to 5.1, and get an error about the mysql.proc table is missing or corrupt. The mysql.proc table appears

Re: How could i check the following values in MySQL Server 5.0

2008-10-24 Thread Moon's Father
Any additional tools will satisfy your demand. On Mon, Oct 13, 2008 at 7:34 PM, Sudhir Menon [EMAIL PROTECTED] wrote: My reply was with regards to the answer in this post. http://lists.mysql.com/mysql/214827 Anyways thanks for the concern from your end.. Mike :) My query was answered.

Re: order of items in a WHERE...IN clause

2008-10-24 Thread Moon's Father
See the usage of the function named field. On Mon, Jul 28, 2008 at 8:15 PM, Mr. Shawn H. Corey [EMAIL PROTECTED]wrote: On Mon, 2008-07-28 at 07:32 -0400, Gary Josack wrote: Andrew Martin wrote: Hello, Is it permissible to order a clause such that the search term is the first item