Re: more queries vs a bigger one

2005-07-17 Thread sam . deforest
Hello, approx. how long does it take your big query to run as it is now? Are these queries appending a table? or are they buiding a result (from a chain of queries)? Have you tried separating them out? Any difference? -sam Hi, I have a big query that involves searching in more tables

Stored procedures and multi-queries: bug?

2005-07-14 Thread Warren Young
get this error: PROCEDURE foo can't return a result set in the given context If you set this flag in the mysql_real_connect() call, the stored procedure works fine. But if you set it with mysql_set_server_option(), only regular multi-queries work fine; stored procedures returning result sets

Re: Stored procedures and multi-queries: bug?

2005-07-14 Thread Paul DuBois
, the server refuses to return the result set. You get this error: PROCEDURE foo can't return a result set in the given context If you set this flag in the mysql_real_connect() call, the stored procedure works fine. But if you set it with mysql_set_server_option(), only regular multi-queries work fine

slow queries

2005-07-13 Thread tony
Hi, I have a query that keeps coming up in my slow queries log. The whole database is innodb and i'm using mysql 4.1.11 on 64bit intel running red hat linux. There are less than 100 rows in the offending table at anyone time, and the server load rarely creeps up above 0.5 If i try to manually

Re: Issue with AS and sub queries

2005-07-10 Thread Gleb Paharenko
Hello. Please can you send the complete query and table definition, because I was unable to reproduce this weird behavior. What version of MySQL do you use? What client do you use to execute queries? We can see below, that there is no period before total_bandwidth: mysql select (SELECT

Issue with AS and sub queries

2005-07-07 Thread Dan Rossi
Hi there somehow my AS field alias of a sub query is adding a dot at the start therefore I cant use it in my application. (SELECT SUM(feed_usage.bandwidth) AS bandwidth FROM feed_usage WHERE customerID IN (57) AND DATE_FORMAT(feed_usage.stats_date,'%m%Y')=DATE_FORMAT(NOW(),'%m%Y') ) AS

Re: why are these two queries deadlocking?

2005-07-06 Thread Gleb Paharenko
that is scanned in the processing of the SQL query. Brady Brown [EMAIL PROTECTED] wrote: SHOW INNODB STATUS indicates these two queries are deadlocking: (1) REPLACE INTO TMP_pixel_xfer SELECT * FROM user_question q INNER JOIN user_session s USING(user_session_id) WHERE user_question_id

why are these two queries deadlocking?

2005-07-05 Thread Brady Brown
SHOW INNODB STATUS indicates these two queries are deadlocking: (1) REPLACE INTO TMP_pixel_xfer SELECT * FROM user_question q INNER JOIN user_session s USING(user_session_id) WHERE user_question_id BETWEEN '27853011' AND '27891923' ORDER BY s.user_id (2) DELETE t from TMP_user_client_report

Combining several sum queries

2005-06-22 Thread David Kagiri
When i run the queries below they all work just fine SELECT sum(consultation)+ sum(laboratory) FROM nairobi,familymembers WHERE familymembers.dependantid = nairobi.memberid and familymembers.memberid = AKI1 SELECT sum(consultation)+ sum(laboratory) FROM riftvalley,familymembers WHERE

Re: Combining several sum queries

2005-06-22 Thread Jochem van Dieten
On 6/22/05, David Kagiri wrote: When i run the queries below they all work just fine SELECT sum(consultation)+ sum(laboratory) FROM nairobi,familymembers WHERE familymembers.dependantid = nairobi.memberid and familymembers.memberid = AKI1 SELECT sum(consultation)+ sum(laboratory

Re: Combining several sum queries

2005-06-22 Thread SGreen
Jochem van Dieten [EMAIL PROTECTED] wrote on 06/22/2005 07:34:30 AM: On 6/22/05, David Kagiri wrote: When i run the queries below they all work just fine SELECT sum(consultation)+ sum(laboratory) FROM nairobi, familymembers WHERE familymembers.dependantid = nairobi.memberid

Re: Combining several sum queries

2005-06-22 Thread leegold
On Wed, 22 Jun 2005 09:55:39 -0400, [EMAIL PROTECTED] said: Jochem van Dieten [EMAIL PROTECTED] wrote on 06/22/2005 07:34:30 AM: On 6/22/05, David Kagiri wrote: When i run the queries below they all work just fine SELECT sum(consultation)+ sum(laboratory) FROM nairobi

Re: Tough queries

2005-06-21 Thread mark warren bracher
points- point_id | game_id | team_id | goal_player_id | pass_player_id1 | pass_player_id2 The kind of queries I'd like to perform would be (if possible in one query or a subset of queries) something to generate the following as a list of N games with the scores (if the game was played and team

Re: Tough queries

2005-06-15 Thread David Legault
| team_id | player_name games - game_id | team_id1 | team_id2 points- point_id | game_id | team_id | goal_player_id | pass_player_id1 | pass_player_id2 The kind of queries I'd like to perform would be (if possible in one query or a subset of queries) something to generate the following as a list of N

Re: Prevalidating queries?

2005-06-14 Thread SGreen
(that is what you call what you are doing with your data, a transaction. You are predicating the commitment of queries 1 and 2 based on the performance of query 3.) To stay with MyISAM as your storage engine, you will need to archive your original records and restore them through your code (in case

Re: Prevalidating queries?

2005-06-14 Thread Andy Pieters
I seriously encourage you to read up on transactions and InnoDB and I strongly suggest you change your table design (to use InnoDB). That way you have an actual ROLLBACK command at your disposal. Otherwise you will be re-inventing the wheel by creating a versioning-locking system for MyISAM

Re: Prevalidating queries?

2005-06-14 Thread SGreen
Andy Pieters [EMAIL PROTECTED] wrote on 06/14/2005 09:59:09 AM: I seriously encourage you to read up on transactions and InnoDB and I strongly suggest you change your table design (to use InnoDB). That way you have an actual ROLLBACK command at your disposal. Otherwise you will be

Re: Prevalidating queries? [SOLVED]

2005-06-14 Thread Andy Pieters
Hi Thanks that really does answer my question and it meets my requirements as well. Thank you With kind regards Andy -- Registered Linux User Number 379093 -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++ L+++$ E---(-)@

Tough queries

2005-06-14 Thread David Legault
| team_name players - player_id | team_id | player_name games - game_id | team_id1 | team_id2 points- point_id | game_id | team_id | goal_player_id | pass_player_id1 | pass_player_id2 The kind of queries I'd like to perform would be (if possible in one query or a subset of queries) something

Re: Tough queries

2005-06-14 Thread mfatene
players - player_id | team_id | player_name games - game_id | team_id1 | team_id2 points- point_id | game_id | team_id | goal_player_id | pass_player_id1 | pass_player_id2 The kind of queries I'd like to perform would be (if possible in one query or a subset of queries) something to generate

Prevalidating queries?

2005-06-13 Thread Andy Pieters
Hi all As part of an automated patch system, I am facing the following problem: * A script will update the program from version x to version y * The script contains file actions, and database (mysql) actions * The actions are executed in order * For each action, a backup copy is created (if

RE: Prevalidating queries?

2005-06-13 Thread mathias fatene
, continue with query n+1 4. else rexecute query n --- But here data can become incohrent. A workaround seems to me to alter your table to innodb engine just for the upgrade. Then start transactions with n grouped queries. Then decide a commit or rollback. At the end of teh upgrade, you can come

Lost connection to MySQL server during query - on long queries

2005-06-01 Thread Amir Shay
Hello, Each time we run long queries (over around 5 seconds) the mySQL server fails and restarts (you can see it in the error log that starts with Database page corruption on disk or a fail.. and then there is a dump...) and the query return with Lost connection to MySQL server during query

Re: Lost connection to MySQL server during query - on long queries

2005-06-01 Thread Dobromir Velev
2005 12:04, Amir Shay wrote: Hello, Each time we run long queries (over around 5 seconds) the mySQL server fails and restarts (you can see it in the error log that starts with Database page corruption on disk or a fail.. and then there is a dump...) and the query return with Lost connection

Recursive queries

2005-05-13 Thread Marcus Bointon
I have a table that represents a tree structure via a self-join. I'd like to get hold of all parent records in a single query - is such a thing possible? e.g. given idparentid 10 21 32 42 51 64 If I was starting with record 4, I would want it to return records 2

Re: Recursive queries

2005-05-13 Thread mfatene
Hi, in oracle we have connect by prior for hierachical data traversal. in mysql, you can use group_concat like this : mysql select parentid, group_concat(id) from ids - group by parentid; +--+--+ | parentid | group_concat(id) | +--+--+ |

Re: Recursive queries

2005-05-13 Thread Marcus Bointon
On 13 May 2005, at 10:02, [EMAIL PROTECTED] wrote: if you use php, you can look at http://www.sitepoint.com/article/hierarchical-data-database That's just what i needed, great article. Thanks, Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] |

Re: Recursive queries

2005-05-13 Thread John Doe
Am Freitag, 13. Mai 2005 10.32 schrieb Marcus Bointon: I have a table that represents a tree structure via a self-join. I'd like to get hold of all parent records in a single query - is such a thing possible? e.g. given idparentid 10 21 32 42 51 64 There is

Solution to slow queries (Resolved, kinda)

2005-05-12 Thread Paul Halliday
Hi, First of all, thanks to everyone that provided pointers on this matter. The route I chose to take was to make 2 tables. One is for cumulative network stats; this table can be used for the weekly,monthly,yearly reports. I also created a table for daily stats which will be dropped at midnight

Re: Solution to slow queries

2005-05-11 Thread Roger Baklund
Paul Halliday wrote: srcaddr VARCHAR(15), dstaddr VARCHAR(15), Are these ip-adresses? If they are, consider using UNSIGNED INT columns and the INET_NTOA() and INET_ATON() funtions. It will save you a lot of space, thus increase the amount of data your hw can handle. They are indeed

Solution to slow queries

2005-05-10 Thread Paul Halliday
Hello, I am working on a database that deals with network statistics. I have a program that generates web reports based on this data every ten minutes. The table layout looks something like this: CREATE TABLE traffic ( unix_secs INT UNSIGNED NOT NULL, dpkts INT UNSIGNED NOT NULL

Re: Solution to slow queries

2005-05-10 Thread Frank Bax
At 02:22 PM 5/10/05, Paul Halliday wrote: Now, as time progresses the queires are getting slower and slower. I know this is expected, I don't think so. I thought that if the number of rows returned does not change and an index is properly used, then query time should not change significantly

Re: Solution to slow queries

2005-05-10 Thread James Nobis
Don't forget to run an analyze to adjust the statistics for the optimizer/indexes. Also, after any updates (on dynamic tables which yours is) or any deletes run an optimize. Quoting Paul Halliday [EMAIL PROTECTED]: Hello, I am working on a database that deals with network statistics. I have a

Re: Solution to slow queries

2005-05-10 Thread John McCaskey
On Tue, 2005-05-10 at 14:56 -0400, Frank Bax wrote: At 02:22 PM 5/10/05, Paul Halliday wrote: Now, as time progresses the queires are getting slower and slower. I know this is expected, I don't think so. I thought that if the number of rows returned does not change and an index is

RE: Solution to slow queries

2005-05-10 Thread TheRefUmp
I'm somewhat a newbee on this database but some observations: As your table grows (and indexes) INSERTS will definitly slow because of the indexes. Consider MySQL's version of Oracle's partitioning and using MERGE TABLES feature. Just remember that if you change 1 table, all of them have to be

Re: Solution to slow queries

2005-05-10 Thread mfatene
Hi, you have to play with explain to see which index is used in your queries. Since you defined only mono-column indexes, i think they are not used in queries with multi-criteria search. Consider adding indexes with all used columns and eventually drop the not used ones to not slow updates

Re: Solution to slow queries

2005-05-10 Thread Eric Jensen
We did something similar for our large statistic tables. The older data that no longer changes would get shipped off into a very fast read only table with a cron job and then that is the table we would generate the reports on. Even with millions of entries it is incredibly fast. Eric Jensen

Comparing to null queries

2005-05-10 Thread Mike Rykowski
Hello, I have a query: select * from table where del != 1; Let's assume that I have a record where del is null (del is a single character field). In version 3.23.22-beta I get the record returned with the above query, in version 4.1.10a I get nothing returned. Did something change between

Re: Comparing to null queries

2005-05-10 Thread mfatene
Hi, 'l' is neither equal to null nor different from null. you can try select ('l'!=NULL) or select ('l'=NULL). in 4.1.x you should write : select * from table where del != l' or del is null; mysql select * from tbl; +--+ | del | +--+ | NULL | | a| | b| | l| | m| | l

Re: Comparing to null queries

2005-05-10 Thread Michael Stassen
Mike Rykowski wrote: Hello, I have a query: select * from table where del != 1; Let's assume that I have a record where del is null (del is a single character field). In version 3.23.22-beta I get the record returned with the above query, in version 4.1.10a I get nothing returned. Did something

Re: Comparing to null queries

2005-05-10 Thread Peter Brawley
Mike, If 3.23.22 gave (NULL != 1) = TRUE, that was a bug, because in SQL, (NULL != 1) is NULL. This 3.23.26 change history item might be your culprit: "Fixed `' to work properly with `NULL'." PB - Mike Rykowski wrote: Hello, I have a query: select * from table where del != "1";

Re: Solution to slow queries

2005-05-10 Thread Roger Baklund
Paul Halliday wrote: srcaddr VARCHAR(15), dstaddr VARCHAR(15), Are these ip-adresses? If they are, consider using UNSIGNED INT columns and the INET_NTOA() and INET_ATON() funtions. It will save you a lot of space, thus increase the amount of data your hw can handle. I have read

Re: Solution to slow queries

2005-05-10 Thread Paul Halliday
On 5/10/05, Roger Baklund [EMAIL PROTECTED] wrote: Paul Halliday wrote: srcaddr VARCHAR(15), dstaddr VARCHAR(15), Are these ip-adresses? If they are, consider using UNSIGNED INT columns and the INET_NTOA() and INET_ATON() funtions. It will save you a lot of space, thus

Client-side subqueries MUCH faster than server-side queries... DESIGN flaw!

2005-05-07 Thread Kevin Burton
tell MySQL subqueries in 4.1.x releases are totally broken with IN clauses The major reason is that they don't use *ANY* indexes and resort to full table scans. Lets take two queries: {{{ mysql EXPLAIN SELECT * FROM FEED, ARTICLE WHERE ARTICLE.ID = 1628011 AND FEED.ID = ARTICLE.ID

Re: Slow queries, why?

2005-05-05 Thread Gleb Paharenko
Hello. There could be a lot of reasons for such a delay. First, you should switch to bulk inserts and perform all operation as a single transaction. Avoid usage of the autoextended or per-table tablespaces. Are you able to upgrade? There could be some performance improvements in the newer

FW: Slow queries, why?

2005-05-05 Thread lakshmi.narasimharao
confirm it? Thanks, Narasimha From: David Griffiths [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 10:19 PM To: Gleb Paharenko Cc: mysql@lists.mysql.com Subject: Re: Slow queries, why? Yes, indexes slow down inserts (or updates that change the value of a column that is indexed). Also

Re: Slow queries, why?

2005-05-04 Thread Gleb Paharenko
Hello. We're running MySQL 4.11 on a machine with 2GB memory, the table is InnoDB with a compound primary key, and additional indexes on all rows with searchable options in the API. Any generic advice or admin tools would be great. Use EXPLAIN to determine how efficient your

RE: Slow queries, why?

2005-05-04 Thread lakshmi.narasimharao
me in this, it is very urgent. Thanks, Narasimha -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 1:11 PM To: mysql@lists.mysql.com Subject: Re: Slow queries, why? Hello. We're running MySQL 4.11 on a machine with 2GB memory, the table

Re: Slow queries, why?

2005-05-04 Thread David Griffiths
cardinality means there aren't many distinct values) 2) Are only used in a where clause with another column that has good cardinality then they are an excellent candidate for removal. While EXPLAIN is great for queries, it won't help much with an insert; it might be useful for figuring out what

Re: Slow queries, why?

2005-05-04 Thread Joseph Cochran
Thanks! Explain and InnoDB monitor were exactly what I needed to diagnose and fix the problem! In case you were curious, the issue was that the statement I was expecting to run was not the statement that was running, but the first hundred and some-odd characters in both were the same. Using the

Slow queries, why?

2005-05-03 Thread Joseph Cochran
So here's my situation: we have a database that has a table of about 5 million rows. To put a new row into the table, I do an INSERT ... SELECT, pulling data from one row in the table to seed the data for the new row. When there are no active connections to the DB other than the one making the

Re: Slow queries, why?

2005-05-03 Thread Scott Haneda
on 5/3/05 7:25 PM, Joseph Cochran at [EMAIL PROTECTED] wrote: So here's my situation: we have a database that has a table of about 5 million rows. To put a new row into the table, I do an INSERT ... SELECT, pulling data from one row in the table to seed the data for the new row. When there

Re: JBoss queries aren't cached by MySQL

2005-04-26 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rafal Kedziorski wrote: Hi, we have the problem, that queries generated by JBoss or our code which runns under JBoss will be not cached by MySQL. The same query sendet from an external application or MySQLFront will be cached by the same MySQL

String of 150 queries fast locally, but takes much longer accross cross connect

2005-04-22 Thread Andrew
packets received, 0% packet loss round-trip min/avg/max/stddev = 0.090/0.102/0.117/0.009 ms There is no indication that there is anything slow about the connection between the two of them. I have one page where a string of 150 very simple queries are run one after another. It always loaded fairly fast

JBoss queries aren't cached by MySQL

2005-04-21 Thread Rafal Kedziorski
Hi, we have the problem, that queries generated by JBoss or our code which runns under JBoss will be not cached by MySQL. The same query sendet from an external application or MySQLFront will be cached by the same MySQL. I'm using JBoss 3.2.5 with JDBC 3.0.16 and MySQL 4.0.23a. Any idea why

very complicated queries (for me at least).

2005-04-14 Thread Chris Knipe
It's official. I need help ;) Let's do the table structures quickly. mysql DESCRIBE FlightData; +---+--+--+-+-++ | Field | Type | Null | Key | Default | Extra |

Re: very complicated queries (for me at least).

2005-04-14 Thread Rhino
on your own *and* understanding it thoroughly. Rhino - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, April 14, 2005 4:16 AM Subject: very complicated queries (for me at least). It's official. I need help ;) Let's do the table structures

Optimizing server variables for unindexed queries

2005-04-03 Thread Jan Pieter Kunst
Greetings, I sent this mail to the list a week ago, but haven't seen any replies ... surely someone on this list must have some ideas? Suppose I have a MySQL server which processes lots of queries that cannot use indexes on VARCHAR fields because they involve REGEXP clauses and LIKE

Re: Why doesn't MySQL cache queries that start with parenthesis? (further info)

2005-03-29 Thread Sergei Golubchik
, but then you won't be notified when the bug is fixed) I read a comment in the documentation that if you put SQL_CACHE in the SELECTs of the parenthesized queries, it will cache the individual queries: http://dev.mysql.com/doc/mysql/en/query-cache.html That's not true. It won't cache even

Why doesn't MySQL cache queries that start with parenthesis?

2005-03-28 Thread Homam S.A.
I have a query of the form: (SELECT A, B from X ORDER BY A LIMIT 1000) UNION ALL (SELECT A, B from Y ORDER BY A LIMIT 1000) ORDER BY A I thought may be each query needs to start with SELECT, so I wrapped the above query in a derived-table expression like: SELECT * FROM ( (SELECT A, B from X

Why doesn't MySQL cache queries that start with parenthesis? (further info)

2005-03-28 Thread Homam S.A.
in the SELECTs of the parenthesized queries, it will cache the individual queries: http://dev.mysql.com/doc/mysql/en/query-cache.html That's not true. It won't cache even the parenthsized queries, and the execution time is still the same with SQL_CACHE and not. I have the query cache configured to cache

Optimizing server variables for unindexed queries

2005-03-26 Thread Jan Pieter Kunst
Greetings, Suppose I have a MySQL server which processes lots of queries that cannot use indexes on VARCHAR fields because they involve REGEXP clauses and LIKE '%...%', most of them also having an ORDER BY. Both MyISAM and InnoDB tables. What would be the best server variables to tune

Re: Queries inside UDF

2005-03-25 Thread sguazt sguazt
From: Philippe Poelvoorde [EMAIL PROTECTED] Reply-To: 'mysql@lists.mysql.com ' mysql@lists.mysql.com To: 'mysql@lists.mysql.com ' mysql@lists.mysql.com Subject: Re: Queries inside UDF Date: Mon, 21 Mar 2005 11:05:39 + sguazt sguazt wrote: Hi! From: Philippe Poelvoorde [EMAIL PROTECTED] Reply

Re: Queries inside UDF

2005-03-21 Thread Philippe Poelvoorde
sguazt sguazt wrote: Hi! From: Philippe Poelvoorde [EMAIL PROTECTED] Reply-To: 'mysql@lists.mysql.com ' mysql@lists.mysql.com To: mysql@lists.mysql.com Subject: Re: Queries inside UDF Date: Thu, 17 Mar 2005 08:22:46 + .. You can actually access a DB within a UDF, but you should do the same

Which one of these two queries would be fastest?

2005-03-19 Thread Jan Pieter Kunst
Assuming everything is properly indexed. (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, field2 FROM my_table_2; or (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, field2 FROM my_table_2; Is there anything to say about this in a general sense, or does it

Re: Which one of these two queries would be fastest?

2005-03-19 Thread Martijn Tonies
Assuming everything is properly indexed. (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, field2 FROM my_table_2; or (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, field2 FROM my_table_2; Is there anything to say about this in a general sense, or

show all running queries on linux

2005-03-18 Thread Reinhart Viane
Hey list, How can I see the running queries on a linux comp? Thx Reinhart

Which one of these two queries would be fastest?

2005-03-18 Thread Jan Pieter Kunst
Assuming everything is properly indexed. (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, field2 FROM my_table_2; or (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, field2 FROM my_table_2; Is there anything to say about this in a general sense, or does it

Re: show all running queries on linux

2005-03-18 Thread Hassan Schroeder
Reinhart Viane wrote: How can I see the running queries on a linux comp? If you have a fairly standard config, with a log file defined -- prompt grep '^log=' /etc/my.cnf | sed 's/log=//g' | xargs tail -f If there's no log file in /etc/my.cnf, start by putting one there :-) HTH! -- Hassan Schroeder

Re: show all running queries on linux

2005-03-18 Thread Dan Nelson
In the last episode (Mar 18), Reinhart Viane said: How can I see the running queries on a linux comp? SHOW [FULL] PROCESSLIST. And you don't need to be running Linux; it's a standard mysql command. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list

Re: show all running queries on linux

2005-03-18 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/mysql/en/show-processlist.html How can I see the running queries on a linux comp? Reinhart Viane [EMAIL PROTECTED] wrote: -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET

Re: Queries inside UDF

2005-03-17 Thread Philippe Poelvoorde
sguazt sguazt wrote: Thanks for answering! Your solution would be right if I can modify the database (and I have no control on software that populate tables). Unfortunately I can do only queries on that db; so the due date has to be recalculated every time I want to perform the main report

Re: Queries inside UDF

2005-03-17 Thread sguazt sguazt
Hi! From: Philippe Poelvoorde [EMAIL PROTECTED] Reply-To: 'mysql@lists.mysql.com ' mysql@lists.mysql.com To: mysql@lists.mysql.com Subject: Re: Queries inside UDF Date: Thu, 17 Mar 2005 08:22:46 + ... You can actually access a DB within a UDF, but you should do the same than when you're using

Queries inside UDF

2005-03-16 Thread sguazt sguazt
Hi folks! (I hope this is the right list ... if not please tell me where I can submit this post) I would like to create a MySQL UDF (i.e. User Defined Function) that embeds a query; for instance, suppose the UDF is named foobar: mysql SELECT foobar(); When foobar function receives the control

RE: Queries inside UDF

2005-03-16 Thread Tom Crimmins
On Wednesday, March 16, 2005 09:30, sguazt sguazt wrote: Hi folks! (I hope this is the right list ... if not please tell me where I can submit this post) I would like to create a MySQL UDF (i.e. User Defined Function) that embeds a query; for instance, suppose the UDF is named foobar:

RE: Queries inside UDF

2005-03-16 Thread sguazt sguazt
Hi! From: Tom Crimmins [EMAIL PROTECTED] To: sguazt sguazt [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: RE: Queries inside UDF Date: Wed, 16 Mar 2005 10:09:16 -0600 ... Can you explain exactly what you are using this for? What benefit does this provide over just executing the query? You

RE: Queries inside UDF

2005-03-16 Thread SGreen
sguazt sguazt [EMAIL PROTECTED] wrote on 03/16/2005 11:54:26 AM: Hi! From: Tom Crimmins [EMAIL PROTECTED] To: sguazt sguazt [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: RE: Queries inside UDF Date: Wed, 16 Mar 2005 10:09:16 -0600 ... Can you explain exactly what you

RE: Queries inside UDF

2005-03-16 Thread sguazt sguazt
From: [EMAIL PROTECTED] To: sguazt sguazt [EMAIL PROTECTED] CC: mysql@lists.mysql.com,[EMAIL PROTECTED] Subject: RE: Queries inside UDF Date: Wed, 16 Mar 2005 12:37:59 -0500 I can almost follow the logic of your pseudocode. Can you explain what it is you are trying to compute? It seems as though

RE: Queries inside UDF

2005-03-16 Thread SGreen
PROTECTED] Subject: RE: Queries inside UDF Date: Wed, 16 Mar 2005 12:37:59 -0500 I can almost follow the logic of your pseudocode. Can you explain what it is you are trying to compute? It seems as though you are looking for (or computing) the ending value to some sort of time span but I

RE: Queries inside UDF

2005-03-16 Thread sguazt sguazt
Thanks for answering! Your solution would be right if I can modify the database (and I have no control on software that populate tables). Unfortunately I can do only queries on that db; so the due date has to be recalculated every time I want to perform the main report (that use the ending date

Slow queries only the first time

2005-03-10 Thread Bob O'Neill
Hello. I am wondering why some of my queries are slow on the first run, but speedy on subsequent runs. They are not being query cached, as I have query_cache_type set to DEMAND. Is it something as simple as pulling the data into RAM from disk, or is there something else going on? Here's

Re: Slow queries only the first time

2005-03-10 Thread Homam S.A.
/Sec and Disk Reads/Sec. If these two counters were low in the subsequent queries (and they should unless you're tight on physical memory), then the data is cached. --- Bob O'Neill [EMAIL PROTECTED] wrote: Hello. I am wondering why some of my queries are slow on the first run, but speedy

Re: Slow queries only the first time

2005-03-10 Thread Michael Stassen
On Mar 10, 2005, at 11:20 AM, Bob O'Neill wrote: Hello. I am wondering why some of my queries are slow on the first run, but speedy on subsequent runs. They are not being query cached, as I have query_cache_type set to DEMAND. Is it something as simple as pulling the data into RAM from disk

RE: Slow queries only the first time

2005-03-10 Thread Gordon
the disadvantages of losing the data on system shutdown. -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:43 PM To: Bob O'Neill Cc: mysql@lists.mysql.com Subject: Re: Slow queries only the first time On Mar 10, 2005, at 11:20 AM, Bob O'Neill

How to send queries to a database periodically

2005-02-24 Thread Peter PeterDresden
Hi, is there a possibillity in mysql to send periodically queries to a database, for example all 5 minutes? Or, a liitle bit off topic, is there a possibility to this via php? Or, is it normally possible to set up such a query via cron tab (unix based web servers only)? Thanx. -- MySQL

Re: How to send queries to a database periodically

2005-02-24 Thread Rhino
- Original Message - From: Peter PeterDresden [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, February 24, 2005 8:05 AM Subject: How to send queries to a database periodically Hi, is there a possibillity in mysql to send periodically queries to a database, for example

RE: How to send queries to a database periodically

2005-02-24 Thread Jay Blanchard
[snip] is there a possibillity in mysql to send periodically queries to a database, for example all 5 minutes? Or, a liitle bit off topic, is there a possibility to this via php? Or, is it normally possible to set up such a query via cron tab (unix based web servers only)? Thanx. [/snip] Yes

Re: How to send queries to a database periodically

2005-02-24 Thread Scott Hamm
Subject: How to send queries to a database periodically Hi, is there a possibillity in mysql to send periodically queries to a database, for example all 5 minutes? Or, a liitle bit off topic, is there a possibility to this via php? Or, is it normally possible to set up such a query via

RE: How to send queries to a database periodically

2005-02-24 Thread Jay Blanchard
[snip] Where can I find cron for Windows? That will make my life a whole lot better! [/snip] It is called Task Scheduler http://www.iopus.com/guides/winscheduler.htm -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: How to send queries to a database periodically

2005-02-24 Thread Karam Chand
SQLyog (www.webyog.com) has an option called SQLyog Notification Services. It can execute a set of queries and even send you the report over email. Using this you can schedule it to run a set of queries anytime you want. Karam --- Peter PeterDresden [EMAIL PROTECTED] wrote: Hi

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

2005-02-23 Thread zzapper
On Sun, 13 Feb 2005 10:34:39 +, wrote: 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 From Shantanu http

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

2005-02-23 Thread Sergei Skarupo
MySQL Cookbook by DuBois. -Original Message- From: zzapper [mailto:[EMAIL PROTECTED] Sent: Sunday, February 13, 2005 2:35 AM To: mysql@lists.mysql.com Subject: Is there a Library of complex queries/inserts/queries? Hi, Sometimes an example is worth a 1000 words. Does anyone know

INSERT queries hang on amd64

2005-02-16 Thread Michel Buijsman
My problem: INSERT queries hang on amd64. This looks a lot like Don MacAskill's bugreport in http://bugs.mysql.com/bug.php?id=3483 Which is listed as closed, but the bug is apparently still there so maybe it should be reopened... I've just upgraded from 4.1.9 to 4.1.10 (binary) on a dual

INSERT queries hang on amd64

2005-02-16 Thread Michel Buijsman
Problem: INSERT queries hang on amd64. This looks a lot like Don MacAskill's bugreport in http://bugs.mysql.com/bug.php?id=3483 I've just upgraded from 4.1.9 to 4.1.10 on a dual opteron with 8G ram, running Debian 3.1. Also tried 4.0.23 last week, but that had the same problems. Kernels I've

Re: [MySQL General] INSERT queries hang on amd64

2005-02-16 Thread Michel Buijsman
On Wed, Feb 16, 2005 at 12:41:04PM +0100, Michel Buijsman wrote: My problem: INSERT queries hang on amd64. Sorry about the multiple mails, mysql.com's mailinglist software does annoying things with the wrong adresses... -- Michel Buijsmantty.nl -- 2dehands.nl

RE: INSERT queries hang on amd64

2005-02-16 Thread Donny Simonton
it on and see what happens, it could be a bug inside the mysql code. Donny -Original Message- From: Michel Buijsman [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 5:41 AM To: mysql@lists.mysql.com Subject: INSERT queries hang on amd64 My problem: INSERT queries hang on amd64

Re: INSERT queries hang on amd64

2005-02-16 Thread Greg Whalin
machines have 4 GB RAM and similar my.cnf settings giving 1.5GB to keybuffer, 768M to sort_buffer). In some cases, we are seeing queries take twices as long on the opteron machines as on the xeons, and it is rare for the opterons to ever outperform our xeon cluster. It is also much more likely

INSERT queries hang on amd64

2005-02-16 Thread Michel Buijsman
Problem: INSERT queries hang on amd64. This looks a lot like Don MacAskill's bugreport in http://bugs.mysql.com/bug.php?id=3483 I've just upgraded from 4.1.9 to 4.1.10 on a dual opteron with 8G ram, running Debian 3.1. Also tried 4.0.23 last week, but that had the same problems. Kernels I've

Re: join speed vs. 2 queries

2005-02-15 Thread Mathew Ray
-dimensional analysis on the data such as getting all the hits for each of m-variables with n-values each within a date range that also contain certain other varname/value combinations. Now if I am doing multiple different queries on this data, using different fields of the table in each one

Re: join speed vs. 2 queries

2005-02-15 Thread Peter Brawley
for each of m-variables with n-values each within a date range that also contain certain other varname/value combinations. Now if I am doing multiple different queries on this data, using different fields of the table in each one, is it preferable to create an index for each query, or make one

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