Re: Yet a solution for the No-Indexes-Used-In-Selects-With-Or-In-Where-Clause-Problem

2001-12-13 Thread Chris Withers
Michael Braun wrote: > > I'm using mysql 3.23.41 on MacOSX... > The problem is, that MySQL isn't able to use indexes for OR in the WHERE > clause yet and therefore the additional OR prevents optimal use of > indexes. MySQL uses only one index for a select, so it can't use an index > when there is

Re: Slow results with SELECT's that return large numbers of results

2001-12-07 Thread Chris Withers
Jeremy Zawodny wrote: > > > > SELECT COUNT(*) FROM foo WHERE ... > > > > > How can I get this to work with a GROUP BY? > > Can you post the query along with the output of EXPLAIN so we > can get a good idea what's going on? Query: SELECT documents.document_id FROM documents, dictiona

Re: Efficient Boolean combination of results of several SELECTs

2001-12-06 Thread Chris Withers
Sinisa Milivojevic wrote: > > No, but in 4.1 there will be INTERCEPT and MINUS too, beside > UNION's (with or without ALL option). Those three combined can > produce any of the above relational operations. wooah! *dribble*! :-) When can I start using this code? Where can I get it from? ch

Re: Slow results with SELECT's that return large numbers of results

2001-12-06 Thread Chris Withers
Jeremy Zawodny wrote: > > SQL_BUFFER_RESULT (http://www.mysql.com/doc/S/E/SELECT.html) my help, > depending on what the real bottleneck is. H... I thought temporary tables were bad? > Sure, change your > > SELECT * FROM foo WHERE ... > > to > > SELECT COUNT(*) FROM foo WHERE ... > >

Re: Efficient Boolean combination of results of several SELECTs

2001-12-06 Thread Chris Withers
Jeremy Zawodny wrote: > > > Yup, but given that each WHERE clause is already pretty hairy, I was > > hoping someone would say "oh, sure, here's some set operations to > > complement UNION" ;-) > > How about, "try out MySQL 4.0 with UNION support"? :-) Can UNION do boolean AND, NOT and OR combin

Re: Efficient Boolean combination of results of several SELECTs

2001-12-06 Thread Chris Withers
Jeremy Zawodny wrote: > > Hm. It sounds like you just want to combine the WHERE clauses > (intelligently) and end up with one big query, right? Yup, but given that each WHERE clause is already pretty hairy, I was hoping someone would say "oh, sure, here's some set operations to complement UNION

Re: Slow results with SELECT's that return large numbers of results

2001-12-06 Thread Chris Withers
neeraj arora wrote: > > Hi, > I think indexing the column(s) can help you. Already spent a week figuring how to get the SELECT to work fast when a few results are returned, os all appropriate columns are indexed ;-) > u can find more on this page > http://www.linux-mag.com/cgi-bin/printer.pl?i

Efficient Boolean combination of results of several SELECTs

2001-12-06 Thread Chris Withers
...in MySQL, to keep the list filter happy :-( Hi, I have several different SELECTs, each of which returns a set of results which I'd like to combine in a boolean fashion. So, say I have 4 selects, w, x, y, and z, I might want to do: ((x AND y) OR Z ) AND (NOT w) What's the best way of going

[ot] harsh mail rejection

2001-12-06 Thread Chris Withers
[EMAIL PROTECTED] wrote: > > Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > database,sql,query,table Why does this list not include SELECT and INSERT?

Slow results with SELECT's that return large numbers of results

2001-12-05 Thread Chris Withers
Hi, If I have a SELECT that returns a large number of results, say > 1000, then returns the results for the SELECT takes much over an order of magnitude longer than if the results set had been, say, 100. Now, is there any way I can quickly return the length of the result set withotu actually ret

MySQL still hanging on Win2K :-(

2001-12-01 Thread Chris Withers
Hi again, Sinisa... Chris Withers wrote: > > Okay, table_cache increased from 64 to 256... > > > * check free disk space on all drives Well, it got up to indexing 10,000 documents this time but then hung again. Now, I don't know if this is because increasing the table_cac

Re: MySQL thread hanging on Win2K

2001-12-01 Thread Chris Withers
Hi Sinisa, Sinisa Milivojevic wrote: > > There are several possibilities. You could be reaching some OS limits > or haning user / group permission problems. Don't think its permissions, since I had a similar process which ran fine, but I had to change the schema to use the last insert id for ot

MySQL thread hanging on Win2K

2001-12-01 Thread Chris Withers
Hi, I've got a problem with 3.23.44-max-nt on Windows 2000 using Berkley tables. I'm running an import process which inserts a big set of rows ('bout 27 million), as part of a document indexing process. Each new row uses the AUTO_INCREMENT_ID from the previous row. So, I have a loop which basica

Re: InnoDB select slow too

2001-11-30 Thread Chris Withers
Heikki Tuuri wrote: > > Chris, > > what is your my.cnf or my.ini like? Do you have a big enough > innodb_buffer_pool_size? set-variable = innodb_buffer_pool_size=300M big enough? Chris database, sql, query, table (just to keep the stoopid list software from whinging..) -

Re: InnoDB select slow too

2001-11-30 Thread Chris Withers
[EMAIL PROTECTED] wrote: > > Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > database,sql,query,table > > If you just reply to this message, and incl

Re: InnoDB inserts: HELP! :-)

2001-11-30 Thread Chris Withers
Joe Ellis wrote: > > Just For My Info: does it take long for one insert. if so, what does > the insert statement look like. the reason i ask is becuase i use > InnoDB and inserted a few records and it was pretty quick. but maybe > thats becuase my statement was: > insert into table (user,email

Re: InnoDB inserts: HELP! :-)

2001-11-30 Thread Chris Withers
Norman Khine wrote: > > Welcome to the MySQL list;^) good to see you here... *grinz* It's weird being a newbie again :-P > "In inserts InnoDB uses the insert buffer to merge secondary index records > to indexes in batches. That saves a lot of disk i/o. In rollback no such > mechanism is used, a

InnoDB inserts: HELP! :-)

2001-11-30 Thread Chris Withers
Okay, second time of asking, does anyone know why InnoDB inserts are an order of magnitude slower than BDB inserts? Is this true only for me? If so, what am I doing wrong? Is it a FAQ? If so, where can I find the answer? Are InnoDB tables supposed to behave like this? If so, why? I know I'm n

InnoDB inserts slow?

2001-11-29 Thread Chris Withers
Hi there, Was using BDB tables for some full text indexing schema I've got. Indexing a document involves inserting a whole lot of rows in one table, having done some selects and possibly inserts on another table. With BDB, this was averaging 1.5 seconds a document. Thought I'd try InnoDB since