Re: Query performance plain/text versus AES_DECRYPT(): LIKE %..%

2007-10-25 Thread John Kraal
Auch, thanks for pointing that out, what a terrible mistake. I am aware of the performance issue, and so is the customer. But with a table that's only going to hold maximally 60.000 records in 10 years, I'm not afraid it'll cause significant problems. If it gets out of hand we'll have to think

Index usage for simple query

2007-10-25 Thread Colin Martin
Hi there, Can someone please explain why when the query below uses one constant in the WHERE clause, MySQL decides to use the index on the 'source' column, and why in the second query where there are two constants, it decides not to? Is there a way to get MySQL to use the index for the secon

Re: Index usage for simple query

2007-10-25 Thread Baron Schwartz
Hi, Colin Martin wrote: Hi there, Can someone please explain why when the query below uses one constant in the WHERE clause, MySQL decides to use the index on the 'source' column, and why in the second query where there are two constants, it decides not to? Is there a way to get MySQL to u

Re: correct way to simulate 'except' query in mysql 4.1

2007-10-25 Thread Baron Schwartz
Hi, Russell Uman wrote: howdy. i trying to find items in one table that don't exist in another. i'm using a left join with a where clause to do it: SELECT t1.field, t2.field FROM table1 t1 LEFT JOIN table2 t2 ON t1.word = t2.word WHERE t2.word IS NULL; both tables are quite large and the q

Re: Index usage for simple query

2007-10-25 Thread Colin Martin
Baron Schwartz wrote: Hi, Colin Martin wrote: Hi there, Can someone please explain why when the query below uses one constant in the WHERE clause, MySQL decides to use the index on the 'source' column, and why in the second query where there are two constants, it decides not to? Is there

Re: Index usage for simple query

2007-10-25 Thread Baron Schwartz
Hi, Colin Martin wrote: Baron Schwartz wrote: Hi, Colin Martin wrote: Hi there, Can someone please explain why when the query below uses one constant in the WHERE clause, MySQL decides to use the index on the 'source' column, and why in the second query where there are two constants, it d

Select question

2007-10-25 Thread Matthew Stuart
I've got this statement to select the last two entries in my db: SELECT top 2 * FROM Content ORDER BY ContentID desc and it works fine because it selects the last two items entered into the db. However, I only want to be able to select item 2 rather than both 1 and 2. How do I do that? Tha

Re: Index usage for simple query

2007-10-25 Thread Joerg Bruehe
Hi all, Baron Schwartz wrote: Hi, Colin Martin wrote: Baron Schwartz wrote: Hi, Colin Martin wrote: Hi there, Can someone please explain why when the query below uses one constant in the WHERE clause, MySQL decides to use the index on the 'source' column, and why in the second query whe

Re: Select question

2007-10-25 Thread Ralf Hüsing
Matthew Stuart schrieb: > I've got this statement to select the last two entries in my db: > > SELECT top 2 * > FROM Content > ORDER BY ContentID desc > > and it works fine because it selects the last two items entered into the db. However, I only want to be able to select item 2 rather than bo

Re: Index usage for simple query

2007-10-25 Thread Baron Schwartz
Hi, Joerg Bruehe wrote: Hi all, Baron Schwartz wrote: Hi, Colin Martin wrote: Baron Schwartz wrote: Hi, Colin Martin wrote: Hi there, Can someone please explain why when the query below uses one constant in the WHERE clause, MySQL decides to use the index on the 'source' column, and w

RE: Select question

2007-10-25 Thread Jerry Schwartz
Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com > -Original Message- > From: Matthew Stuart [mailto:[EMAIL PROTECTED] > Sent:

Re: correct way to simulate 'except' query in mysql 4.1

2007-10-25 Thread Russell Uman
There's no "using distinct", but there is "not exists", and in fact no rows are returned. Slow query log reports "#Query_time: 94 Lock_time: 0 Rows_sent: 0 Rows_examined: 370220" EXPLAIN: id select_type table type possible_keys key key_len ref rows

Re: Table type for high number of insert/delete operations

2007-10-25 Thread Dan Buettner
Jim, MyISAM tables tend to work best in situations where the proportions of reads to writes is either very high or very low. That is to say, either the data doesn't change much but it's being accessed a lot, or the data changes a lot but it's rarely accessed. MyISAM is quite a bit faster than Inn

running a second mysql server

2007-10-25 Thread Naufal Sheikh
Hi List, Though new to mysql server, I was pretty happy with what I was doing till I needed to run another instance of mysql server on the same machine. My first installation is running on port 3307 instead of default which I achieved by adding a port attribute in /etc/my.cnf file. Rest of the /e

Re: running a second mysql server

2007-10-25 Thread Mathieu Bruneau
Naufal Sheikh a écrit : Hi List, Though new to mysql server, I was pretty happy with what I was doing till I needed to run another instance of mysql server on the same machine. My first installation is running on port 3307 instead of default which I achieved by adding a port attribute in /etc/m

Re: I'm actually planning the application first instead of coding first!!! :)

2007-10-25 Thread Mathieu Bruneau
Jason Pruim a écrit : Hi Everyone, So having learned my lesson with the last application, I am trying to plan out the addition of a feature to my database application. Basically, some of my customers go south for the winter ("Snow Birds") what I would like to do is have away of storing both t