RE: Query speed

2001-05-02 Thread Braxton Robbason
seems to me that the first query uses your primary key index. Since you have specified qualifications on crcid and tag in both aliases, it will resolve to a small number of rows in each alias table. The second query will join your aliases on the crcid index, and then the tag qualifications will

RE: LAST_INSERT_ID returning 3 rows?

2001-04-30 Thread Braxton Robbason
last_insert_id is a function. It will return a value for each row in the table. You want to run: select last_insert_id() as lid; instead of selecting from a table. -Original Message- From: Graeme B. Davis [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 3:17 PM To: [EMAIL

RE: Problems with MOD

2001-04-28 Thread Braxton Robbason
isn't this the expected behavior? (1008306000-988344000)/86400 = 231.04 select mod(231.04,7); 0 231.04 mod 7 is .04, rounded down to 0. 7*33=231 the mod function rounds the result - that's expected, right? Other than that I don't see what the problem is. braxton -Original Message-

RE: count(*) questions

2001-04-26 Thread Braxton Robbason
I think this is an interesting question. Note the following: count(col1) will tell you the number of non-null occurrences of col1 col1=value will return 1 is col1=value, 0 if col1value 1/0 will return null thus, count(1/(col1=value)) will tell you the number of occurences of value in col1.

RE: Newbie question - Hopefully not too stupid!

2001-04-26 Thread Braxton Robbason
howzabout SELECT Table1.id, Table1.name, count(1/(Table2.offon = 'off')) AS NOFF FROM Table1 , Table2 WHERE Table1.id = Table2.id GROUP BY Table1.id, Table1.name HAVING NOFF=0; works for me: mysql create table Table1 (id int, name varchar(10)); Query OK, 0 rows affected (0.01 sec) mysql

RE: Can anyone help with a search?

2001-04-24 Thread Braxton Robbason
if you are using tcsh: set docroot='path to your html root directory' find $docroot -name *.html allhtml.list foreach FILE (`cat allhtml.list`) echo $FILE outhtml.list grep 'link' $FILE outhtml.list end you can get more sophisticated than this, but this will work. then look through

RE: Generic questions

2001-04-23 Thread Braxton Robbason
Andrzej, As I understand it, MySQL does not have the concept of tablespaces like in Oracle. Databases are subdirectories underneath the /var/lib/mysql directory and files are tables within those subdirectories, so you can put an entire database or individual files on a different disk by

RE: Referer Count

2001-04-22 Thread Braxton Robbason
why are you using distinct(ref1)? also count(*) is ambiguous in this case. should be count(a.*). you have a ref1 column in both tables, but you don't join them on it. that's kind of confusing but won't cause the problem. member_id is the primary key on the members table, right? Otherwise you

RE: Mysql weird problem

2001-04-21 Thread Braxton Robbason
I think your problem is at the netscapeapache level, not the mysql level. Can you view static html pages served by your local apache with netscape? since netscape, opera, and IE all connect to apache, and then apache calls perl to connect to mysql, I doubt your problem has anything to do with

RE: complicated query

2001-04-20 Thread Braxton Robbason
you want a function that prepends the letter a to the category/subcategory names that are not other. then you order by that function, but do not display it. select category,subcategory from foo2 order by if(category= 'other','zz',concat('a',category)); i.e. everything except other begins with

RE: max FULLTEXT index size?

2001-04-20 Thread Braxton Robbason
Robbason Cc: Mysql Subject: Re: max FULLTEXT index size? Hi! On Apr 19, Braxton Robbason wrote: Hi all, I'm creating a fulltext index on a 400MB table, and the creation process gets very slow. It's fast for the first 50MB of the index, and then it grinds to what seemed like a halt after days. My

max FULLTEXT index size?

2001-04-19 Thread Braxton Robbason
Hi all, I'm creating a fulltext index on a 400MB table, and the creation process gets very slow. It's fast for the first 50MB of the index, and then it grinds to what seemed like a halt after days. My question is - is there anyone who's created fulltext indexes on this much data who can assure

RE: Correct syntax?

2001-04-19 Thread Braxton Robbason
select word, count(word) as total from search_words where word is not null group by word order by total desc limit 20 -Original Message- From: Graham Nichols [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 1:36 PM To: [EMAIL PROTECTED] Subject: Correct syntax? Thanks for help

RE: Run time version of MySQL (Detail)

2001-04-19 Thread Braxton Robbason
John, I don't think anyone can say for sure which is 'better'. MySQL is used in a different kind of environment than Oracle. Oracle is designed for an enterprise environment, where many different applications are used simultaneously to add or retrieve data from a central data store. MySQL is

RE: Phrase based fulltext searching

2001-04-18 Thread Braxton Robbason
I thought I read that was in the plan for 4.0. I can't find where that's stated in the docs though - all I see is the stuff about boolean operators. Does anyone have experience with using the AOL PLS package for text searching? I am thinking of using it. Braxton -Original Message-

RE: How to structure a random query

2001-04-18 Thread Braxton Robbason
http://www.mysql.com/doc/M/a/Mathematical_functions.html describes how to do this using the RAND() function. -Original Message- From: Alec Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 6:27 PM To: [EMAIL PROTECTED] Subject: How to structure a random query I'm just