Re: Why MySQL doesn't cache queries that populate temp tables?

2005-02-14 Thread Gleb Paharenko
Hello. As said at: http://dev.mysql.com/doc/mysql/en/query-cache-how.html A query will not be cached, if it uses TEMPORARY tables. Homam S.A. [EMAIL PROTECTED] wrote: Why MySQL insists on ignoring the query cache whenever I use the same query repeatedly to populate a temp

queries slower on InnoDB

2005-02-14 Thread Zhe Wang
Hi, there, I am in the middle of replacing a MyISAM database with InnoDB. Queries show table status and select count are extremely slow which gave me some pain. I am wondering if there are any other queries on InnoDB that are significantly slower than those on MyISAM other than these two

Re: queries slower on InnoDB

2005-02-14 Thread Eric Bergen
] wrote: Hi, there, I am in the middle of replacing a MyISAM database with InnoDB. Queries show table status and select count are extremely slow which gave me some pain. I am wondering if there are any other queries on InnoDB that are significantly slower than those on MyISAM other than

join speed vs. 2 queries

2005-02-14 Thread Mathew Ray
Newbie on the list here having a bit of confusion at the moment why an INNER JOIN is taking so long... I have replaced a few column names to make it a bit more succinct: SELECT COUNT(*) FROM data, values, names WHERE data.campaign_id = 22 AND names.name = 'content' AND values.value = 'index'

Re: queries slower on InnoDB

2005-02-14 Thread Ryan McCullough
need. Example: show table status like 'my_table' I'm not aware of any plans to speed up either of these commands on InnoDB. On Mon, 14 Feb 2005 12:06:09 -0500, Zhe Wang [EMAIL PROTECTED] wrote: Hi, there, I am in the middle of replacing a MyISAM database with InnoDB. Queries

Re: queries slower on InnoDB

2005-02-14 Thread Eric Bergen
Feb 2005 12:06:09 -0500, Zhe Wang [EMAIL PROTECTED] wrote: Hi, there, I am in the middle of replacing a MyISAM database with InnoDB. Queries show table status and select count are extremely slow which gave me some pain. I am wondering if there are any other queries on InnoDB

Re: join speed vs. 2 queries

2005-02-14 Thread Peter Brawley
I have a gut feeling that this kind of join should be able to be done with similar speed without having to use a temp table Yep but remember the query engine uses one index per table so without seeing your EXPLAIN output I'd try indexing ... the data table on name_id,value_id,campaign_id,

Is there a Library of complex queries/inserts/queries?

2005-02-13 Thread zzapper
Hi, Sometimes an example is worth a 1000 words. Does anyone know of a website with lists of mysql statement examples? ie a list of queries, a list of updates, list of inserts from simple examples to joins regexps etc zzapper (vim, cygwin, wiki zsh) -- vim -c :%s%s

Why MySQL doesn't cache queries that populate temp tables?

2005-02-11 Thread Homam S.A.
Why MySQL insists on ignoring the query cache whenever I use the same query repeatedly to populate a temp table? So I have: create temporary table MyTable select SQL_CACHE * from SomeTable WHERE (A bunch of criteria) limit 1000; SomeTable is a read-only table. If I issue the query without the

Re: How to log some queries and not others

2005-02-10 Thread George Chelidze
Dear Paul, Paul DuBois wrote: At 19:52 +0300 2/9/05, George Chelidze wrote: Hello, I have the following problem: I have a table with a blob field and turned on query logging. I'd like to log every query except inserts into table with a blob field because my log files grow very fast and I don't

How to log some queries and not others

2005-02-09 Thread George Chelidze
Hello, I have the following problem: I have a table with a blob field and turned on query logging. I'd like to log every query except inserts into table with a blob field because my log files grow very fast and I don't like to see binary data in my log files, while other logs are very

Re: How to log some queries and not others

2005-02-09 Thread DreamWerx
Cron hack? have a console running: tail -f hostname.log | grep tablename filter.log -or- tail -f hostname.log | grep -v insert into blobtablename filter.log then have a cronjob every X minutes running: echohostname.log To truncate the full querylog from getting too big? Not

Re: How to log some queries and not others

2005-02-09 Thread Paul DuBois
At 19:52 +0300 2/9/05, George Chelidze wrote: Hello, I have the following problem: I have a table with a blob field and turned on query logging. I'd like to log every query except inserts into table with a blob field because my log files grow very fast and I don't like to see binary data in my

Simmering FT Queries

2005-02-08 Thread Homam S.A.
I'm evaluating MySQL FT search, and so far it's been very disappointing. The queries on a test table of about 2 million rows with Text columns (average 75 words per text column) are extremely slow, compared to a regular FT search engine, like Lucene. What's disturbing is that it doesn't consume

Re: bash powered MySQL Queries

2005-01-31 Thread beacker
I just wanted to know what would be the easiest way to retrieve simple data from a MySQL database from a bash script. Easiest way I've used to do it is: mysql EOQ select count(1) from tables; EOQ Which allows you to feed random queries to mysql from a bash script. Brad

Re: bash powered MySQL Queries

2005-01-31 Thread andy thomas
On Sun, 30 Jan 2005, Andy wrote: Hi all I just wanted to know what would be the easiest way to retrieve simple data from a MySQL database from a bash script. I do this a lot - just construct the query and dump it into a file from within the script, eg: echo select * from widgets

Re: bash powered MySQL Queries

2005-01-31 Thread Andy
Thank you all for your replies. I think that ShellSQL is really the thing I am looking for. With kind regards Andy On Sun January 30 2005 23:50, Andy wrote: Hi all I just wanted to know what would be the easiest way to retrieve simple data from a MySQL database from a bash script.

Re: bash powered MySQL Queries

2005-01-31 Thread Jason Martin
On Mon, Jan 31, 2005 at 06:57:58PM +, Edward Macnaghten wrote: 1 - The output is not cluttered with headers, and a means exist to easily separate fields when there is more than one column or row in the query. The mysql --batch option should take care of that for you. -Jason Martin -- If

Re: bash powered MySQL Queries

2005-01-31 Thread Edward Macnaghten
Forgive me for blowing my own trumpet here. The advantage with ShellSQL over this method is 1 - The output is not cluttered with headers, and a means exist to easily separate fields when there is more than one column or row in the query. 2 - The connection is persistant, whereas running

bash powered MySQL Queries

2005-01-30 Thread Andy
Hi all I just wanted to know what would be the easiest way to retrieve simple data from a MySQL database from a bash script. With kind regards Andy -- --- Registered Linux user number 379093 --- -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: bash powered MySQL Queries

2005-01-30 Thread Edward Macnaghten
Funny you should mention that May I guide you to my recent announcment of ShellSQL 0.7 - web page at http://www.edlsystems.com/shellsql - a utility to do just as you want (I think) released under GPL. It must be good - I wrote it myself :-) Yours Eddy Andy wrote: Hi all I just wanted to

Re: bash powered MySQL Queries

2005-01-30 Thread Kevin A. Burton
Edward Macnaghten wrote: Funny you should mention that May I guide you to my recent announcment of ShellSQL 0.7 - web page at http://www.edlsystems.com/shellsql - a utility to do just as you want (I think) released under GPL. It must be good - I wrote it myself :-) SELECT * FROM /dev/zero

Re: mysql store queries?

2005-01-22 Thread Gleb Paharenko
Hello. Does mysql stores queries? If so where? MySQL server can log the queries in log files. See: http://dev.mysql.com/doc/mysql/en/Log_Files.html Jerry Swanson [EMAIL PROTECTED] wrote: Does mysql stores queries? If so where? -- For technical support contracts, goto

mysql store queries?

2005-01-21 Thread Jerry Swanson
Does mysql stores queries? If so where? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Getting 4.0.18 to log connects, connect errors, and NOT queries...

2005-01-14 Thread Michael Loftis
IS there any way to get the 4.0.18/4.0 series to log client connects (disconnects maybe too, but that's optional) connect errors (IE password/auth failures) WITHOUT logging every query? Like every time a client gets say ERROR 1045: Access denied for user: [EMAIL PROTECTED]' (Using password:

Re: use of soundex in queries

2005-01-13 Thread Sasha Pachev
Raphael Matthias Krug wrote: Sasha P.S. I have a theory that a habit of printing computer documentation is a road block to becoming a guru. At least, I have not yet encountered a guru that printed much, while at the same time it seems like a struggling user prints a lot. You cannot be 100% sure

RE: does anyone know of a utility that will processes the query log to rerun the queries?

2005-01-11 Thread Daniel Gaddis
log. Does anyone know of a utility that will processes the general query log (not the binary log or the binary log text file from mysqlbinlog) to rerun the queries? The program would need to... ...strip file header information ...strip the leading non query info from the line ...handle queries

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-11 Thread Pete Moran
I recently had a similar problem, however you may find that its more of a case of correctly indexing your tables. Yyou should look for the tables which need indexing, I enabled the slow-query-log as well as enabling of logging of queries which didnt use indexes and found some which did some very

does anyone know of a utility that will processes the query log to rerun the queries?

2005-01-10 Thread Daniel Gaddis
does anyone know of a utility that will processes the query log to rerun the queries? The program would need to... ...strip the leading non query info from the line ...handle queries that span multiple lines ...change databases when appropriate before queries ...add the ; to the end

Re: does anyone know of a utility that will processes the query log to rerun the queries?

2005-01-10 Thread Daniel Kasak
Daniel Gaddis wrote: does anyone know of a utility that will processes the query log to rerun the queries? The program would need to... ...strip the leading non query info from the line ...handle queries that span multiple lines ...change databases when appropriate before queries ...add

Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread BD
Hi, I'm having a problem with slow query and parse times with a MySQL - PHP ecommerce application I am testing out. Also getting an error message with the key_buffer variable. I tried to improve MySQL speed/performance by adding key_buffer=50M to my my.cnf file for [mysqld]. When I restarted

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread Tom Crimmins
= key_buffer = 64M' to your my.cnf. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- From: BD Sent: Friday, January 07, 2005 9:07 AM To: mysql@lists.mysql.com Subject: Slow queries, need advice on how to improve; key_buffer? Hi, I'm having a problem

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread BD
. Should I also enter tick marks? I tried that too. BD -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 11:20 AM To: BD Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer? [snip] I tried to improve

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread Tom Crimmins
AM To: mysql@lists.mysql.com Subject: Slow queries, need advice on how to improve; key_buffer? Hi, I'm having a problem with slow query and parse times with a MySQL - PHP ecommerce application I am testing out. Also getting an error message with the key_buffer variable. I tried to improve MySQL

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread BD
-Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 12:08 PM To: BD Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer? [snip] I tried to improve MySQL speed/performance by adding key_buffer=50M to my my.cnf

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread Tom Crimmins
07, 2005 11:21 AM To: Tom Crimmins Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer? Hi Tom, OK thanks I just added the set-variable = key_buffer = 64M line to my my.cnf file and at least I got no errors and the MySQL server restarted OK and I got my

RE: Slow queries, need advice on how to improve; key_buffer - zen-cart?

2005-01-07 Thread BD
PROTECTED] Sent: Friday, January 07, 2005 12:23 PM To: BD Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer? [snip] The problem now is, this did not do anything to improve the query and parse times. I'm testing out an on line store which has about

RE: Slow queries, need advice on how to improve; key_buffer - zen -cart?

2005-01-07 Thread Tom Crimmins
queries. [mysqld] set-variable = long_query_time=2 log-long-format log-slow-queries = /var/log/mysqld.slow.log (or whatever file you want, just make sure the user mysqld is running as has write permissions to it.) --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original

FW: Slow queries, need advice on how to improve; key_buffer - zen-cart?

2005-01-07 Thread BD
To: BD Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer - zen-cart? [snip] The application I am using for the site is www.zen-cart.com so I'm not sure I can do anything about changing the table indexes because it is a pre written php-MySQL open source

RE: Slow queries, need advice on how to improve; key_buffer - zen -cart?

2005-01-07 Thread Tom Crimmins
[snip] # Time: 050107 17:40:41 # [EMAIL PROTECTED]: zencarttest[zencarttest] @ [xxx.xxx.xxx.xxx] # Query_time: 13 Lock_time: 0 Rows_sent: 148 Rows_examined: 1567270 use zencarttest; select distinct m.manufacturers_id, m.manufacturers_name from zen_manufacturers m left

Re: use of soundex in queries

2005-01-02 Thread Kevin A. Burton
Raphael Matthias Krug wrote: Hi, I need to compare names from different tables and therefore I need to know the proper use of soundex. I googled for it, but could not find anything useful. And select soundex('text') is no help for me. FYI Soundex has real problems ... use DoubleMetaphone...

Re: use of soundex in queries

2005-01-01 Thread Sasha Pachev
Raphael Matthias Krug wrote: Hi Shawn, I printed the manual, but as I am not such a database guru I was not able to transfer this knowlegde into an select-statement. Thanks for your realtimehelp. Is it possible to do an select-query with soundex like the following examble? select nn from

Re: use of soundex in queries

2005-01-01 Thread Raphael Matthias Krug
Sasha P.S. I have a theory that a habit of printing computer documentation is a road block to becoming a guru. At least, I have not yet encountered a guru that printed much, while at the same time it seems like a struggling user prints a lot. You cannot be 100% sure about the cause and effect

use of soundex in queries

2004-12-31 Thread Raphael Matthias Krug
Hi, I need to compare names from different tables and therefore I need to know the proper use of soundex. I googled for it, but could not find anything useful. And select soundex('text') is no help for me. The query should look like this: select field from table where field like [soundexquery

Re: use of soundex in queries

2004-12-31 Thread SGreen
Did you think to check the manual? English: http://dev.mysql.com/doc/mysql/en/String_functions.html German http://dev.mysql.com/doc/mysql/de/String_functions.html French: http://dev.mysql.com/doc/mysql/fr/String_functions.html and your query would look like SELECT ... FROM ... WHERE

Re: use of soundex in queries

2004-12-31 Thread Raphael Matthias Krug
Hi Shawn, I printed the manual, but as I am not such a database guru I was not able to transfer this knowlegde into an select-statement. Thanks for your realtimehelp. Is it possible to do an select-query with soundex like the following examble? select nn from table where nn !='' my database

Re: use of soundex in queries

2004-12-31 Thread SGreen
This will give you a list of names and their soundex values. Is this what you want? What is it you are trying to do, there may be a better way to do this than by getting a list and reprocessing it somehow. SELECT nn, soundex(nn) FROM table WHERE nn '' Shawn Green Database Administrator

RE: Need more info about currently running queries

2004-12-22 Thread Anil Doppalapudi
Anil -Original Message- From: Greg Fortune [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 1:34 AM To: mysql@lists.mysql.com Subject: Re: Need more info about currently running queries Yep, mysqladmin can give the same info. As noted in my original message, I need much

Re: Need more info about currently running queries

2004-12-21 Thread Gleb Paharenko
Hello. Using SHOW PROCESSLIST you can just check if your query running, or is waiting for some lock. For more info, you can run ps axm in shell and look for the thread state, but that's more related to the kernel stuff. See: http://dev.mysql.com/doc/mysql/en/SHOW_PROCESSLIST.html

Re: Need more info about currently running queries

2004-12-21 Thread Greg Fortune
Yep, mysqladmin can give the same info. As noted in my original message, I need much more detailed info. The crux of the problem is that I need to run a query that could take several hours when it's using indexes correctly, but it is not working correctly so it takes longer than I've been

problem with queries

2004-12-20 Thread DeRyl
hello All, can anybody tell me how to correct this problem: 1. I use queries like that: select /*! SQL_BUFFER_RESULT */ klient.logo, klient.klientid, klient.klientnazwa, klient.struktura, concat(kodpocztowy,' ',miejscowosc) miasto, aparatnumer, concat(ulicaskrot,' ',ulicanazwa,' ',posesja) ulica

Need more info about currently running queries

2004-12-20 Thread Greg Fortune
Is there anyway to get additional information about a query that is currently running? I've got some performance problems I'm trying to analyze while loading large data sets and I'm running a test query, but I don't have any idea how far the query has progressed. The test query is a

Re: queries and mail function

2004-12-18 Thread Sasha Pachev
John Visicaro wrote: Hi, This is my first post so I hope I've done it right. I am having trouble querying an email address from MySQL and then placing that field into the PHP mail function. It doesn't work. Here's my code: $query_string = SELECT Email FROM instructors WHERE HSA_NO = '$insthsaid';

queries and mail function

2004-12-17 Thread John Visicaro
Hi, This is my first post so I hope I've done it right. I am having trouble querying an email address from MySQL and then placing that field into the PHP mail function. It doesn't work. Here's my code: $query_string = SELECT Email FROM instructors WHERE HSA_NO = '$insthsaid'; $result =

sum queries

2004-12-03 Thread James Nunnerley
I'm trying to create a table, and ultimately a graph, out of some syslog data. I have a table with the following info in it: Time (unixtime stamp), bytes rcvd and bytes sent I want to create a sql statement that group the data over a certain period of time, and produces the following

Re: sum queries

2004-12-03 Thread Roger Baklund
James Nunnerley wrote: I'm trying to create a table, and ultimately a graph, out of some syslog data. I have a table with the following info in it: Time (unixtime stamp), bytes rcvd and bytes sent I want to create a sql statement that group the data over a certain period of time, and

RE: sum queries

2004-12-03 Thread James Nunnerley
-Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 16:03 To: [EMAIL PROTECTED] Cc: James Nunnerley Subject: Re: sum queries James Nunnerley wrote: I'm trying to create a table, and ultimately a graph, out of some syslog data. I have

RE: sum queries

2004-12-03 Thread James Nunnerley
-Original Message- From: James Nunnerley [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 16:13 To: 'Roger Baklund'; '[EMAIL PROTECTED]' Subject: RE: sum queries -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 16:03 To: [EMAIL

Re: sum queries

2004-12-03 Thread Roger Baklund
James Nunnerley wrote: * Roger Baklund: select date_format(ts,%Y-%m-%d %H) period,sum(rcvd),sum(sent) from mytable group by period; So the below query above will allow me to group by hour - which is quite useful - is there anyway of grouping by say 3 hour periods? Not using the date_format()

Re: Hung MySQL queries

2004-12-02 Thread Heikki Tuuri
backup tool for InnoDB which also backs up MyISAM tables http://www.innodb.com/order.php - Original Message - From: Joakim Ryden [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Thursday, December 02, 2004 8:35 AM Subject: Hung MySQL queries Hey everyone - I just migrated

Need help figuring out indexes for faster SELECT queries

2004-12-01 Thread Grant Giddens
`,`cat4`)); I do lots of queries like selecting the categories like: $sql = SELECT DISTINCT $store_data_column[cat1] FROM $store_data_table WHERE $store_data_column[cat1] != 'N/A' ORDER BY $store_data_column[cat1] ASC; and $sql = SELECT DISTINCT

Re: Need help figuring out indexes for faster SELECT queries

2004-12-01 Thread Roger Baklund
Grant Giddens wrote: I have a new project I'm working for and I was wondering if anyone could help me optimize my selects for speed. I have a table with about 500,000 entries. The table structure I'm using is (via my PHP commands): $sql = CREATE TABLE $store_data_table (

Hung MySQL queries

2004-12-01 Thread Joakim Ryden
Hey everyone - I just migrated a database from one server to another (4.0.18 official RPM on RH ES 3) and now on the new server I'm running into a problem where queries hang in state statistics as shown by 'mysqladmin processlist'. I tried to see if there was something wrong with the queries

Re: very slow concurrent queries on HEAP table

2004-11-23 Thread Bernd Heller
, mos wrote: At 06:10 PM 11/21/2004, you wrote: Hi all, I've got a rather odd performance problem with concurrent queries here. My query regrettably always needs to do a full table scan - really can't be helped. So my idea was to cache the data in a HEAP table to get maximum performance out

Re: very slow concurrent queries on HEAP table

2004-11-23 Thread mos
of it. Since you are not adding rows to the heap table, try changing it to a simple Integer column. Mike On 23.11.2004, at 5:39 Uhr, mos wrote: At 06:10 PM 11/21/2004, you wrote: Hi all, I've got a rather odd performance problem with concurrent queries here. My query regrettably always needs to do

Headers for queries with empty return sets

2004-11-22 Thread Eric Yeh
Hello, I am a new user of MySQL and have a simple question I was hoping the list could help me with. I have been a long time Sybase user and am now looking at converting some of my scripts to MySQL. I ordinarily run scripts as batch from the command line, and parse the results in a

Re: Headers for queries with empty return sets

2004-11-22 Thread gerald_clark
Eric Yeh wrote: Hello, I am a new user of MySQL and have a simple question I was hoping the list could help me with. I have been a long time Sybase user and am now looking at converting some of my scripts to MySQL. I ordinarily run scripts as batch from the command line, and parse the results

Re: very slow concurrent queries on HEAP table

2004-11-22 Thread mos
At 06:10 PM 11/21/2004, you wrote: Hi all, I've got a rather odd performance problem with concurrent queries here. My query regrettably always needs to do a full table scan - really can't be helped. So my idea was to cache the data in a HEAP table to get maximum performance out

very slow concurrent queries on HEAP table

2004-11-21 Thread Bernd Heller
Hi all, I've got a rather odd performance problem with concurrent queries here. My query regrettably always needs to do a full table scan - really can't be helped. So my idea was to cache the data in a HEAP table to get maximum performance out of it and it works really well, I'm down to 0.07

really slow queries with innodb

2004-11-19 Thread Dale Fay
I was using myisam tables and converted them to innodb with Alter table table TYPE=INNODB; A query that used to take 23 minutes, does not complete in hours. There about 33M rows in the table and I was doing a count of the rows. Some queries with more conditions seem fine. Here is the table

Re: really slow queries with innodb

2004-11-19 Thread SGreen
queries with more conditions seem fine. Here is the table: dspam_token_data | CREATE TABLE `dspam_token_data` ( `uid` smallint(5) unsigned default NULL, `token` char(20) default NULL, `spam_hits` int(11) default NULL, `innocent_hits` int(11) default NULL, `last_hit` date default

Queries taking 60 seconds+

2004-11-11 Thread John Smith
-variable= tmp_table_size=64M set-variable= thread_cache=9 # Try number of CPU's*2 for thread_concurrency set-variable= thread_concurrency=2 set-variable= ft_min_word_len=3 set-variable = long_query_time=2 log-long-format log-slow-queries = /var/log/mysqld.slow.log The table is read only

Re: Queries taking 60 seconds+

2004-11-11 Thread Victor Pendleton
= record_buffer=5M set-variable= tmp_table_size=64M set-variable= thread_cache=9 # Try number of CPU's*2 for thread_concurrency set-variable= thread_concurrency=2 set-variable= ft_min_word_len=3 set-variable = long_query_time=2 log-long-format log-slow-queries = /var/log/mysqld.slow.log

Re: Queries taking 60 seconds+

2004-11-11 Thread John Smith
On Thu, 2004-11-11 at 13:58, Victor Pendleton wrote: What does the explain plan look like? id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE properties ref old,price,countyid countyid 3 const 9233 Using where; Using filesort The filesort I know

RE: Queries taking 60 seconds+

2004-11-11 Thread Andy Eastham
Pendleton Cc: [EMAIL PROTECTED] Subject: Re: Queries taking 60 seconds+ On Thu, 2004-11-11 at 13:58, Victor Pendleton wrote: What does the explain plan look like? id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE properties ref old,price,countyid

Re: Queries taking 60 seconds+

2004-11-11 Thread Philippe Poelvoorde
Hi, could you try adding a key with ALTER TABLE properties ADD INDEX(countyid,old,price); It could maybe help getting less rows at a time. -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: Queries taking 60 seconds+

2004-11-11 Thread John Wards
On Thu, 2004-11-11 at 14:37, Andy Eastham wrote: Have you got a single multi-column index on countyid, price and old, or do you have individual indexes on each of these fields? The former would be much better. Its a single column on countyid, when I ran a select and just used countyid = in

Re: Queries taking 60 seconds+

2004-11-11 Thread John Smith
On Thu, 2004-11-11 at 14:36, Philippe Poelvoorde wrote: Hi, could you try adding a key with ALTER TABLE properties ADD INDEX(countyid,old,price); It could maybe help getting less rows at a time. I dropped the old and price for the where clause and the number of rows scanned were the same as

Re: Queries taking 60 seconds+

2004-11-11 Thread Victor Pendleton
If you build the composit indexes as suggested, does your performance improve? John Smith wrote: On Thu, 2004-11-11 at 13:58, Victor Pendleton wrote: What does the explain plan look like? id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE

Re: Queries taking 60 seconds+

2004-11-11 Thread John Smith
On Thu, 2004-11-11 at 14:59, Victor Pendleton wrote: If you build the composit indexes as suggested, does your performance improve? Erm, do you think it would? Its just that with such a large table and it being compressed it takes ages? -- MySQL General Mailing List For list archives:

Re: Queries taking 60 seconds+

2004-11-11 Thread Jigal van Hemert
From: John Smith [EMAIL PROTECTED] On Thu, 2004-11-11 at 14:36, Philippe Poelvoorde wrote: Hi, could you try adding a key with ALTER TABLE properties ADD INDEX(countyid,old,price); It could maybe help getting less rows at a time. I dropped the old and price for the where clause and

Re: Queries taking 60 seconds+

2004-11-11 Thread mos
At 07:52 AM 11/11/2004, you wrote: Afternoon All, The table is read only for most of the day and will get updated (once I get the queries down to an acceptable level) nightly...if that helps. Any suggestions or further tips would be very helpful as its taken me months to get my code to input

Re: Queries taking 60 seconds+

2004-11-11 Thread John Wards
queries until I found that option. I use it to work out page numbers though, but for the beta search until I can prove I can make money out of this I will remove it. - run OPTIMIZE TABLE regularly to help MySQL optimize execution paths; the cardinality of the indexes are used to optimize

Re: Queries taking 60 seconds+

2004-11-11 Thread John Wards
On Thu, 2004-11-11 at 15:51, mos wrote: John, Create a second table (MyISAM) but this time don't use compression on the table. create table newtable select * from oldtable; Right will run that just now, good idea...just have to avoid the wife as no doubt it will bog the site

Re: Queries taking 60 seconds+

2004-11-11 Thread Stefan Kuhn
It is a property of Mysql that such a query will benefit greatly from a composite index. So I would not consider anything else without having tried this. Am Thursday 11 November 2004 16:29 schrieb John Smith: On Thu, 2004-11-11 at 14:59, Victor Pendleton wrote: If you build the composit

Re: Queries taking 60 seconds+

2004-11-11 Thread John Wards
Right thanks for all the tips the 3 column index has done the job, queries coming back in 0.7 secconds now which is just the job before they get cached. Don't know how I missed that one as it was abovious...i even tried countyid and old...forgot about price.. John -- MySQL General Mailing

.MYD, .MYI files don't exist... but queries WORK??????

2004-11-03 Thread Anders Green
Sequence of events: -had an MS Access db -converted it to MySQL 4.1.7 with a utility -everything worked -using MySQL Query Browser 1.0.1, added three tables -everything worked -comes time to deploy to another machine for testing, copy directory of database over to other machine -any queries

Re: .MYD, .MYI files don't exist... but queries WORK??????

2004-11-03 Thread Tobias Asplund
over to other machine -any queries involving the three new tables fail: mysql select * from admin; ERROR 1016 (HY000): Can't open file: 'admin.InnoDB' (errno: 1) Now, the first thing to do is go looking for files. What I find shocks and amazes me! There are missing files! *grin* For each

Re: .MYD, .MYI files don't exist... but queries WORK??????

2004-11-03 Thread Anders Green
Tobias Asplund wrote: If you installed MySQL 4.1.7 on Windows with the new installer Yes I did. it will automatically use InnoDB tables as the default Ah ha. Thanks. :) That just leaves this: So now my question Where does InnoDB data get stored? Cheers, Anders

Re: Using an array(-ish) in SQL queries

2004-11-03 Thread SGreen
in getting the delete queries to work on multiple tables at once, despite the column names being the same. But besides this: My current version generates, for multi-select cases, queries like this: DELETE FROM the_table WHERE `ID`='1' OR ID`='2' OR `ID`='3' OR `ID`='4' OR `ID`='5

Re: .MYD, .MYI files don't exist... but queries WORK??????

2004-11-03 Thread Tobias Asplund
On Wed, 3 Nov 2004, Anders Green wrote: Tobias Asplund wrote: If you installed MySQL 4.1.7 on Windows with the new installer Yes I did. it will automatically use InnoDB tables as the default Ah ha. Thanks. :) That just leaves this: So now my question Where does InnoDB data get

Re: .MYD, .MYI files don't exist... but queries WORK??????

2004-11-03 Thread Gleb Paharenko
-converted it to MySQL 4.1.7 with a utility -everything worked -using MySQL Query Browser 1.0.1, added three tables -everything worked -comes time to deploy to another machine for testing, copy directory of database over to other machine -any queries involving the three new tables fail

Using an array(-ish) in SQL queries

2004-11-02 Thread -{ Rene Brehmer }-
queries to work on multiple tables at once, despite the column names being the same. But besides this: My current version generates, for multi-select cases, queries like this: DELETE FROM the_table WHERE `ID`='1' OR ID`='2' OR `ID`='3' OR `ID`='4' OR `ID`='5' OR `ID`='6' or similar

Re: [PHP-DB] Using an array(-ish) in SQL queries

2004-11-02 Thread Jennifer Goodie
for each delete routine. I've still not suceeded in getting the delete queries to work on multiple tables at once, despite the column names being the same. But besides this: Multi-table deletes are new to mySQL 4.0, so if you are running a 3.x release they won't work. http://dev.mysql.com/doc

RE: [PHP-DB] Using an array(-ish) in SQL queries

2004-11-02 Thread Bastien Koert
: -{ Rene Brehmer }- [EMAIL PROTECTED] To: [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: [PHP-DB] Using an array(-ish) in SQL queries Date: Wed, 03 Nov 2004 01:29:20 +0100 X-posted to MySQL and PHP DB Hi gang Task at hand: deleting or selecting (same difference) several numbers of records using only 1

sub queries

2004-10-29 Thread Nathan Coast
Hi apologies if this is a dumb question but can you do subqueries in mysql? select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID =2 and UGR.ROLE_ID = (select ROLE_ID from ACL_ROLE where ROLE_NAME = 'projectmanager' ) this query fails, but the individual queries work fine

Re: sub queries

2004-10-29 Thread Wolfram Kraus
, but the individual queries work fine select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID =2 and UGR.ROLE_ID = 3 and select ROLE_ID from ACL_ROLE where ROLE_NAME = 'projectmanager' cheers Nathan You need MySQl 4.1.x to do subqueries. HTH, Wolfram -- MySQL General Mailing List For list

Re: sub queries

2004-10-29 Thread Matthew Scales
ROLE_ID from ACL_ROLE where ROLE_NAME = 'projectmanager' ) this query fails, but the individual queries work fine select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID =2 and UGR.ROLE_ID = 3 and select ROLE_ID from ACL_ROLE where ROLE_NAME = 'projectmanager

Sub queries

2004-10-28 Thread electroteque
Hi there, I have Mysql 4.1 on my development machine, I have been trying to test out if I am going to be able to do this. What I would like to do is return a one to many resultset but without the duplicated results in the first query. Hows is this going to be possible ? I would like to get all

Re: Sub queries

2004-10-28 Thread Rhino
- Original Message - From: electroteque [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 28, 2004 6:33 PM Subject: Sub queries Hi there, I have Mysql 4.1 on my development machine, I have been trying to test out if I am going to be able to do this. What I would like

<    1   2   3   4   5   6   7   8   9   10   >