Re: Avoiding complex mysql selects

2005-07-12 Thread zzapper
On Tue, 12 Jul 2005 18:34:38 -0400, wrote: >H, how about using full text indexing? It will be a lot easier >to implement and a lot quicker. > > Can you give more details? -- zzapper vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?" http://www.rayninfo.co.uk/tips/ vim

Split a table?

2005-07-12 Thread Brian Dunning
If I have a table with 200K records, is there an easy way to split it into two separate tables with 100K records each? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

how to avoid precision problem w/o switching to double?

2005-07-12 Thread Jacek Becla
Hi, I'm having problems with floats while doing comparisons. create table fff (x float); create table ddd (x double); insert into fff (0.1); insert into ddd (0.1); "select * from ddd where x = 0.1" correctly returns one row, but "select * from fff where x = 0.1" does not return anything. I fou

Re: Mixing conditions with NOT BETWEEN

2005-07-12 Thread Michael Stassen
Scott Haneda wrote: SELECT prod_name, sale_price, sale_schedule_status FROM products WHERE NOW() NOT BETWEEN(sale_start AND sale_end) AND sale_schedule_status = 'active'; I am betting this is just some parens I am missing, but the above, does find the records where the date range in NOT BETWE

Re: Conditions in selects

2005-07-12 Thread Michael Stassen
Scott Haneda wrote: I can not get this to work how I would think it should be formatted: SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') That seems to work just fine It should, as that is correct syntax, as documented in the manual

Conditions in selects

2005-07-12 Thread Scott Haneda
I can not get this to work how I would think it should be formatted: SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') That seems to work just fine However, I was under the impression that BETWEEN was to be formatted BETWEEN(va1, v2) Which leads me to: SELECT IF(NOW() BETWEEN(sale_start

Mixing conditions with NOT BETWEEN

2005-07-12 Thread Scott Haneda
SELECT prod_name, sale_price, sale_schedule_status FROM products WHERE NOW() NOT BETWEEN(sale_start AND sale_end) AND sale_schedule_status = 'active'; I am betting this is just some parens I am missing, but the above, does find the records where the date range in NOT BETWEEN the start and end, ho

Re: Searchable/Sortable Encrypted Fields in MySQL?

2005-07-12 Thread mos
At 04:16 PM 7/12/2005, Matt McNeil wrote: I need to securely store lots of sensitive contact information and notes in a (MySQL or other freely available) database that will be stored on a database server which I do not have direct access to. This database will be accessed by a PHP application

Select Query Optimization - 1 minute long :(

2005-07-12 Thread Scott Klarenbach
The following query is in desperate need of optimization. Any gurus out there who can share some insights, I'd greatly appreciate it. I have a request table, from which I'm pulling all records. Each request record has a part number, and for each requested part number, I'd like to query the inven

Re: Avoiding complex mysql selects

2005-07-12 Thread Brent Baisley
H, how about using full text indexing? It will be a lot easier to implement and a lot quicker. On Jul 12, 2005, at 1:09 PM, zzapper wrote: Hi I have a piece of code which will search a series of records for the presence of two keywords $key1 and $key2 (see below) The client now wan

Re: COUNT (*): Fast if NO where clause. slow with WHERE clause (yes, slow even if index is used).

2005-07-12 Thread Jocelyn Fournier
Hi, What about SELECT count(*) FROM table1 - SELECT count(*) FROM table1 WHERE status = 1 ? (this query should be mush faster) Regards, Jocelyn jpow wrote: Hi everyone, I have this problem of slow "count *" when I use a where clause. 1. I have a table of ~1m rows. 2. There is a "status" c

COUNT (*): Fast if NO where clause. slow with WHERE clause (yes, slow even if index is used).

2005-07-12 Thread jpow
Hi everyone, I have this problem of slow "count *" when I use a where clause. 1. I have a table of ~1m rows. 2. There is a "status" column which can be 0 or 1. 3. Most of the rows have a status of 0, but maybe 10% of them have a status of 1. 4. I need to know how many records are status 1 / 0 for

Databases in a different location than the default

2005-07-12 Thread Tim Holmes
Good Afternoon: I have rebuilt by web / database server from bare metal this morning. The computer is running Fedora Core 3, and is fully patched and up to date. The MySQL version is 4.1.12-1, and I have installed the following components - Server - Client -

Searchable/Sortable Encrypted Fields in MySQL?

2005-07-12 Thread Matt McNeil
I need to securely store lots of sensitive contact information and notes in a (MySQL or other freely available) database that will be stored on a database server which I do not have direct access to. This database will be accessed by a PHP application that I am developing. However, I also nee

Re: starting MySQL

2005-07-12 Thread J. David Boyd
Darryl Reeves <[EMAIL PROTECTED]> writes: > I am new to MySQL and was recently given a task where I need to > transfer a database from one computer to another. Both computers are > Macintoshes running OS X Panther. Both computers are running MySQL > through localhost. The computer to which I am tr

starting MySQL

2005-07-12 Thread Darryl Reeves
I am new to MySQL and was recently given a task where I need to transfer a database from one computer to another. Both computers are Macintoshes running OS X Panther. Both computers are running MySQL through localhost. The computer to which I am transferring the database has MySQL up and running pe

Re: parsing show commands (for monitoring/logging)

2005-07-12 Thread Sid Lane
thanks but I already have a bash version that logs to local filesystem (then hacks the log into insert statements). what I'm working on is something to log to another MySQL DB (outside replication environment) to which I point (f)cgi (, etc.) I think I've answered my own ?: it seems DBI will par

Re: parsing show commands (for monitoring/logging)

2005-07-12 Thread Bruce Dembecki
does MySQL have a "pretty" way to persist snapshots of various show commands? for example in Oracle you could just do: insert into sysstat_log select sysdate, * from v$sysstat; --(an ugly, overly simple example) can the show commands be called/parsed with DBD/DBI? so far the only way I've

repair table (error 27)

2005-07-12 Thread Dirk Vleugels
Hi, the DB resided on a network appliance filer (happily for a year). A nfs problem corrupted some tables, all got fixed but this one: mysql> repair table inmail extended; +-++--+---+ | Table | Op | Msg_type | Msg_text

Re: Generating Soccer Standings

2005-07-12 Thread SGreen
Albert Padley <[EMAIL PROTECTED]> wrote on 07/11/2005 07:20:04 PM: > OK. I'm responding to my own post since I figured out the syntax. > This allowed me to figure out how to compute the ties as well as the > wins. How to I compute the losses. I can't use the same technique > because I'd be look

AW: beginner needs help servin up a lan

2005-07-12 Thread Freddie Sorensen
Shawn, Check out dbManager dbTools Professional : http://www.dbtools.com.br/EN/downloads.php It is free and has an MS Access import wizard Freddie > -Ursprüngliche Nachricht- > Von: nephish [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 12. Juli 2005 04:28 > An: mysql@lists.mysql.com

Re: Using "START SLAVE [SQL_THREAD] UNTIL" syntax

2005-07-12 Thread Bruce Dembecki
Good issue, I totally had the same concerns, so we built our own system. As a side note we run an admin server which we use to generate reports, run backups and so on - it takes load off the production servers, where speed is critical. Recovery from backup however is a whole other issue, an

Converting XML to MySQL DB

2005-07-12 Thread reality
Hello, I'm just looking at implementeing the DMOZ open directory into a mysql DB, and having had a quick look notice its in XML format. Does anyone have any insight into go about this - is it even a good idea?(I want to use mysql fulltext search on the data). I'm sure there must be some resource

RE: "tracing" connections to mysql.

2005-07-12 Thread todd hewett
Thanks Gleb, That was educational. Is there a way to log connections in such a way that is easy to tell how many connections were happening at one time? Thanks, Todd -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 12:26 AM To: mysql@l

Avoiding complex mysql selects

2005-07-12 Thread zzapper
Hi I have a piece of code which will search a series of records for the presence of two keywords $key1 and $key2 (see below) The client now wants more keywords $key1,2,3,4 etc But is there any alternative to mushrooming the the following select??? $wherekeyword =<<<__SQL__ and ( (

/var/lib/mysql directory full

2005-07-12 Thread Rabindra Acharya
Hi, Operating System: Debian MySQL Version: 4.0.24 /var/lib/mysql directory, where the MySQL database lives is in the root directory (defaultly installed), and it is currently full. I want to move it in other partition, may be "/usr", and will create a symlink to /var/lib/mysql directory. Is th

Re: Can't connect from remote computer

2005-07-12 Thread Nuno Pereira
Probably one problems with permissions. Salama hussein wrote: I can't connect to Mysql from a remote computer yet I can log in fine locally. When I telnet from a remote computer to port 3306, I get a response. The response wasn't meaningful but it was a response. Any ideas? Salama --

Re: my-medium vs my-huge cnf files

2005-07-12 Thread gerald_clark
Stephane Savage wrote: Hi, I'm quite new to mysql and I have a question regarding the server configuration files. I have a server with 2 go of memory and I would like to know the reason why when I run a query (select * from Mytable) that returns 400k rows the my-medium configuration always run

parsing show commands (for monitoring/logging)

2005-07-12 Thread Sid Lane
does MySQL have a "pretty" way to persist snapshots of various show commands? for example in Oracle you could just do: insert into sysstat_log select sysdate, * from v$sysstat; --(an ugly, overly simple example) can the show commands be called/parsed with DBD/DBI? so far the only way I've com

Re: Using "START SLAVE [SQL_THREAD] UNTIL" syntax

2005-07-12 Thread gerald_clark
David Ulevitch wrote: On Jul 12, 2005, at 6:15 AM, gerald_clark wrote: Nightly backup and binlogs can take you to any point in the day. I failed to make my entire point clear then. That's true. But when someone does the "oh fsck, I think I just ran a catastrophic query on our productio

my-medium vs my-huge cnf files

2005-07-12 Thread Stephane Savage
Hi, I'm quite new to mysql and I have a question regarding the server configuration files. I have a server with 2 go of memory and I would like to know the reason why when I run a query (select * from Mytable) that returns 400k rows the my-medium configuration always runs the query in 30 sec and

Re: Using "START SLAVE [SQL_THREAD] UNTIL" syntax

2005-07-12 Thread David Ulevitch
On Jul 12, 2005, at 6:15 AM, gerald_clark wrote: Nightly backup and binlogs can take you to any point in the day. I failed to make my entire point clear then. That's true. But when someone does the "oh fsck, I think I just ran a catastrophic query on our production database" we would now h

Re: Can't connect from remote computer

2005-07-12 Thread Duncan Hill
On Tuesday 12 July 2005 14:25, Salama hussein typed: > I can't connect to Mysql from a remote computer yet I can log in fine > locally. When I telnet from a remote computer to port 3306, I get a > response. The response wasn't meaningful but it was a response. Exact error message? -- MySQL Gener

Can't connect from remote computer

2005-07-12 Thread Salama hussein
I can't connect to Mysql from a remote computer yet I can log in fine locally. When I telnet from a remote computer to port 3306, I get a response. The response wasn't meaningful but it was a response. Any ideas? Salama -- MySQL General Mailing List For list archives: http://lists.mysql.

Re: Using "START SLAVE [SQL_THREAD] UNTIL" syntax

2005-07-12 Thread gerald_clark
David Ulevitch wrote: [ Note to list admin, you are blocking messages from gmail.com ] MySQL List, I have a large MySQL database (around 20 gigs in total, some tables >=3gigs. All tables are MyISAM. We have replication setup to a number of slaves including one dedicated for backups. All are

Re: beginner needs help servin up a lan

2005-07-12 Thread nephish
Well thanks, these look as if to be exactly what i have been looking for. will test this stuff out when i get to work, thanks again. <>< On Tue, 2005-07-12 at 10:10 +0300, Gleb Paharenko wrote: > Hello. > > > These links could be helpful: > http://dev.mysql.com/doc/mysql/en/export-of-data.h

Re: mysql 4.0 to 4.1 migration and charset problems

2005-07-12 Thread Gleb Paharenko
Hello. > Any possible problems with this approach? It is good, if it solved your problems. >> So it works for me. > > I've ended doing this in a different way. I've created a patch which forces= > a=20 > file to be read - /etc/mysql/mysql-client.conf (which is the same as .my.cn

Re: beginner needs help servin up a lan

2005-07-12 Thread Gleb Paharenko
Hello. These links could be helpful: http://dev.mysql.com/doc/mysql/en/export-of-data.html http://dev.mysql.com/doc/mysql/en/mysql-tools-with-access.html For more information search in archives at: http://lists.mysql.com/mysql nephish <[EMAIL PROTECTED]> wrote: > He

Re: "tracing" connections to mysql.

2005-07-12 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/mysql/en/mysql-threads.html Please, next time answer to the list as well. >Gleb thankyou. > >That was exactly what I thought I was looking for. > >It revealed two connections when logged in as admin through CLI: admin >and >the connection f

Re: how i can log client connections?

2005-07-12 Thread Francesco Dalla Ca'
I need log the connections (succesfull and failed) on a production environment for safety reason and monitoring. Best regards. Date: Fri, 08 Jul 2005 12:46:30 +0300 To: mysql@lists.mysql.com From: Gleb Paharenko <[EMAIL PROTECTED]> Subject: Re: how i can log client connections? Message-ID: <[E

Re: [Fwd: Hi Glen, could I ask a favor regarding the MYSQL list?]

2005-07-12 Thread Jochem van Dieten
On 7/12/05, Gleb Paharenko wrote: > auto_parser wrote: >> >> Would you be able to forward the following message to the mysql list. I >> keep getting bounce-backs with the following: >> >> Recipient: >> Reason:Mail from HELO priv-edtnes27.telusplanet.net rejected >> because it does not a

[Fwd: Hi Glen, could I ask a favor regarding the MYSQL list?]

2005-07-12 Thread Gleb Paharenko
auto_parser wrote: Glen, Would you be able to forward the following message to the mysql list. I keep getting bounce-backs with the following: Recipient: Reason:Mail from HELO priv-edtnes27.telusplanet.net rejected because it does not accept bounces. This violates RFC 821/2505/2821 ht