Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Adam Wolff
increase in the number of records, select queries take twice as long. For each doubling of the number of returned records, there is a sqrt(2) increase in select query time. All this is assuming all relevant database information is in memory. As the database grows, it would likely improve database

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Adam Wolff
of 2-2.5 by changing the double lat/lon to an integer then selecting on an integer. 2) I have concluded that for each 10 fold increase in the number of records, select queries take twice as long. For each doubling of the number of returned records, there is a sqrt(2) increase

pgpool for mysql? Or, a gateway that redirects select queries to a host of servers?

2006-04-23 Thread Philip Hallstrom
Hi all - I'm looking for a way to have a group of mysql servers that are all slaves to a single master. That part I can do. However, what I'd like is a way to put another server in front of the entire cluster and have that pretend to be the mysql database, except that it would simply

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Alexey Polyakov
On 4/23/06, Nick Hill [EMAIL PROTECTED] wrote: 1) I can improve performance by a factor of 2-2.5 by changing the double lat/lon to an integer then selecting on an integer. 2) I have concluded that for each 10 fold increase in the number of records, select queries take twice as long. For each

Re: Optimising for many rows and returned records (de-coupling query time to record set size for range queries)

2006-04-23 Thread Nick Hill
. But then, I may be running inefficient queries as postulated by Adam Wolff. Given that there is such a strong relationship between the number of records returned, and query time, I conclude that the whole index tree is matched for every given number of root x records returned. If all records we

Re: How to remove muiltiple queries to a table at the same time

2006-04-20 Thread WEBBEE . BIZ
an then unlock them, the other processes will wait the table to be unlocked before running their queries : LOCK TABLES `table_name` WRITE; {SQL statements here} UNLOCK TABLES; See also : http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html abhishek jain [EMAIL PROTECTED] wrote in message

How to remove muiltiple queries to a table at the same time

2006-04-15 Thread abhishek jain
me in either: 1)telling me a single query which will fetch and incr. in the same query. so the problem of simultaneously queries are solved. 2)A system by which delaying the other queries are done, I use PHP . Expecting a quick reply. Thanks, Abhishek Jain

Re: How to remove muiltiple queries to a table at the same time

2006-04-15 Thread Puiu Hrenciuc
1. A single query that fetvhes a value, increases it and save it : UPDATE `table_name` SET `field`=`field`+1; 2. You can lock tables, make updates an then unlock them, the other processes will wait the table to be unlocked before running their queries : LOCK TABLES `table_name` WRITE; {SQL

Re: mysqlcc temp table created for queries

2006-03-29 Thread Barry
Song Ken Vern-E11804 wrote: It seems like different version are doing things differently. This is the most normal thing in the world! Looking through the newsgroups forums, I understand that that mysql5.0 will prepend the tablename to each column. But I don't understand what does

mysqlcc temp table created for queries

2006-03-28 Thread Song Ken Vern-E11804
Hi, I am using mysqlcc 0.9.4-beta to browse my DB. Server side am using 5.0.18-nt. However, when I try to double click on a table to see the data, it will always return the error. [localhost] ERROR 1146: Table 'test.1' doesn't exist The SQL query for this is SELECT * FROM `test` The query is

Some queries use 100% CPU after restore

2006-03-17 Thread cnelson
I'm moving a database to a new server. I'm using MySQL v5.0.16 on 'Windows. I used the MySQL Administrator to backup on the old system and restore on the new one. Everything is fine _except_ on the new server, some queries take 2-3 minutes with MySQL using 100% of the CPU. I've dropped

RE: Some queries use 100% CPU after restore

2006-03-17 Thread Gordon
, 2006 2:37 PM To: mysql@lists.mysql.com Subject: Some queries use 100% CPU after restore Importance: High I'm moving a database to a new server. I'm using MySQL v5.0.16 on 'Windows. I used the MySQL Administrator to backup on the old system and restore on the new one. Everything is fine

Re: RE: Some queries use 100% CPU after restore

2006-03-17 Thread cnelson
Have you tried Repair table or if InnoDB ALTER TABLE ENGINE=InnoDB; Sometimes I've noticed after a restore or after adding lots of rows performance is slow. REPAIR or the ALTER TABLE fixes it. I'll try that. Thanks. What's curious is that I've got one backup I can restore and have fine

Re: Some queries use 100% CPU after restore

2006-03-17 Thread gerald_clark
[EMAIL PROTECTED] wrote: I'm moving a database to a new server. I'm using MySQL v5.0.16 on 'Windows. I used the MySQL Administrator to backup on the old system and restore on the new one. Everything is fine _except_ on the new server, some queries take 2-3 minutes with MySQL using 100

Re: How to Log Warnings and Errors from queries

2006-03-13 Thread ryan lwf
Warnings and Errors from queries Hi Dan, Noted with thanks. As such, is there a workaround to log problematic sql queries ran against the mysqld server ? Do I need to write separate script to do this ? Regards, Ryan. On 3/10/06, Dan Nelson [EMAIL PROTECTED] wrote: In the last episode

RE: How to Log Warnings and Errors from queries

2006-03-12 Thread Rithish Saralaya
[mailto:[EMAIL PROTECTED] Sent: Friday, March 10, 2006 8:14 PM To: Dan Nelson Cc: mysql@lists.mysql.com Subject: Re: How to Log Warnings and Errors from queries Hi Dan, Noted with thanks. As such, is there a workaround to log problematic sql queries ran against the mysqld server ? Do I need

Re: How to Log Warnings and Errors from queries

2006-03-10 Thread ryan lwf
Hi Dan, Noted with thanks. As such, is there a workaround to log problematic sql queries ran against the mysqld server ? Do I need to write separate script to do this ? Regards, Ryan. On 3/10/06, Dan Nelson [EMAIL PROTECTED] wrote: In the last episode (Mar 08), ryan lwf said: I

Re: How to Log Warnings and Errors from queries

2006-03-10 Thread Kishore Jalleda
as you know mysql gives you an error to check your sql syntax when it doesn't understand a query but does not log it , but you can have your application (php, perl, etc ) accessing mysql to log any bad/malformed queries... Kishore Jalleda On 3/10/06, ryan lwf [EMAIL PROTECTED] wrote: Hi Dan

Re: How to Log Warnings and Errors from queries

2006-03-10 Thread Subscriptions
and Errors from queries as you know mysql gives you an error to check your sql syntax when it doesn't understand a query but does not log it , but you can have your application (php, perl, etc ) accessing mysql to log any bad/malformed queries... Kishore Jalleda On 3/10/06, ryan lwf [EMAIL

RE: How to Log Warnings and Errors from queries

2006-03-10 Thread Ing. Edwin Cruz
. -Mensaje original- De: Subscriptions [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 10 de Marzo de 2006 10:27 a.m. Para: mysql@lists.mysql.com Asunto: Re: How to Log Warnings and Errors from queries In PHP, you can see the error message as follows: $result = mysql_query($sSQL) or die

How to Log Warnings and Errors from queries

2006-03-09 Thread ryan lwf
Hi all, I understand that the option log-errors and log-warnings only logs server related internal errors. How do I enable logging errors from queries executed, so that I can fix the problematic query statement accordingly? The statement SHOW WARNINGS and SHOW ERRORS does not work on my server

Re: How to Log Warnings and Errors from queries

2006-03-09 Thread Dan Nelson
In the last episode (Mar 08), ryan lwf said: I understand that the option log-errors and log-warnings only logs server related internal errors. How do I enable logging errors from queries executed, so that I can fix the problematic query statement accordingly? The statement SHOW WARNINGS

Re: Best way to design one to many queries

2006-03-08 Thread cnelson
Been wondering this for a while now, I can explain how I do it, but I am sure there are better ways. ... Maybe I'm really missing something here but I think that your querying problem arises from bad data design. This is what I'd do: Product table: ProductID some other stuff

RE: Best way to design one to many queries

2006-03-08 Thread Nicolas Verhaeghe
attributes_links On attributes_links.attribute_id = attributes.id Where attributes_links.dvd_id = 1 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 5:41 AM To: Scott Haneda Cc: MySql Subject: Re: Best way to design one to many queries

Re: RE: Best way to design one to many queries

2006-03-08 Thread cnelson
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 5:41 AM To: Scott Haneda Cc: MySql Subject: Re: Best way to design one to many queries Been wondering this for a while now, I can explain how I do it, but I am sure there are better

Best way to design one to many queries

2006-03-07 Thread Scott Haneda
Been wondering this for a while now, I can explain how I do it, but I am sure there are better ways. I have products and attributes, for example: Product A nice sweet fast funny Attributes are arbitrary, attributes are in a separate table. Yes, I could add fields for the

RE: Best way to design one to many queries

2006-03-07 Thread Nicolas Verhaeghe
integer type you need (smallint, mediumint or int) to optimize your database properly. Then you need to do your search on the link table, inner joined to the products table on the product id or not. When you pull queries on the link table only (for instance to count how many with such attribute

Dynamic queries v/s Stored Procs

2006-02-28 Thread rtroiana
I'm in a process of transitioning from dynamic queries that were generated in C# code to using Stored Procedures. Although i haven't done any analysis of time difference between the two. But i do have few reasons to move to stored procedures: 1) I work on a security application and i heard

RE: Dynamic queries v/s Stored Procs

2006-02-28 Thread rtroiana
records, I have certain operations that need to be executed consecutively. But in case of queries written inside the code, I have separate database calls and that results in too many database calls. For example, 1) I insert data in member table and 2) Get the ID and 3) Insert a new row in entity

Connecting to queries into one

2006-02-27 Thread Courtney Braafhart
MY GOAL To collect any consumers.id WHERE date of birth, last name and first name matches what was entered by the user. The trick is that date of birth lives in the consumer table and last name and first name lives in the cases table (which can be joined to consumers

Connecting to queries into one

2006-02-27 Thread phpninja
To: mysql@lists.mysql.com Subject: Connecting to queries into one MY GOAL To collect any consumers.id WHERE date of birth, last name and first name matches what was entered by the user. The trick is that date of birth lives in the consumer table and last name and first name lives in the cases

RE: Connecting to queries into one

2006-02-27 Thread Taiyo
To: mysql@lists.mysql.com Subject: Connecting to queries into one MY GOAL To collect any consumers.id WHERE date of birth, last name and first name matches what was entered by the user. The trick is that date of birth lives in the consumer table and last

RE: Connecting to queries into one

2006-02-27 Thread John McCaskey
:31 AM To: mysql@lists.mysql.com Subject: Connecting to queries into one MY GOAL To collect any consumers.id WHERE date of birth, last name and first name matches what was entered by the user. The trick is that date of birth lives in the consumer

Re: Connecting to queries into one

2006-02-27 Thread Peter Brawley
Courtney, SELECT consumers.id FROM consumers WHERE date_of_birth = ? AND consumer.id = (SELECT consumer_id FROM cases WHERE last_name = ? AND full_first_name = ? ) Is there a way to form the above statement in MYSQL? Something like this would be faster ... SELECT co.id FROM cases

MySQL Queries within Oscommerce

2006-02-22 Thread AM COMS
Has anyone here had any experience with Oscommerce? I am having problems with the style of queries they have used or am I just seeing things the wrong way! andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: MySQL Queries within Oscommerce

2006-02-22 Thread SGreen
AM COMS [EMAIL PROTECTED] wrote on 02/22/2006 09:16:24 AM: Has anyone here had any experience with Oscommerce? I am having problems with the style of queries they have used or am I just seeing things the wrong way! andrew Sorry! I have never used it. Shawn Green Database

Unknown error - processes/queries hangs

2006-02-15 Thread Mattias Andersson
traffic to the dbm is not a problem, we have taken care of the old-passwords problem. The tests rolled on for hours doing all types of queries, then problems appeared. The largest problem of them all as I see it is that we can not figure out what is wrong. Looking at the error log does not make me

Problems getting MySqlDump to use sub-queries

2006-02-15 Thread Henry Dall
the where portion of the command correctly (though I have tried every possible wrapping with single-quotes that I could come up with) OR are sub-queries simply not supported OR is there something else that I should know. Any help you can give me would be way appreciated. Henry Dall [EMAIL

RE: Problems getting MySqlDump to use sub-queries

2006-02-15 Thread George Law
getting MySqlDump to use sub-queries I am having a problem using MySqlDump. Context: I am having to export some very specific records from our database We have a table called BIN which has, amongst others, an ID column and an ACCOUNT_ID column. When I use this mysqldump -u

Changing types on the fly in select queries?

2005-12-27 Thread Jay Paulson \(CE CEN\)
I have a strange question for you all. I've inherated some code and the way the code works is that I can only mess with the WHERE part of a query. Therefore, I was wondering if something like this would be possible. WHERE where concat(year,period,week) as type int 2007031 Note that I'm

RE: Changing types on the fly in select queries?

2005-12-27 Thread Gordon Bruce
] Sent: Tuesday, December 27, 2005 12:49 PM To: mysql@lists.mysql.com Subject: Changing types on the fly in select queries? I have a strange question for you all. I've inherated some code and the way the code works is that I can only mess with the WHERE part of a query. Therefore, I was wondering

Re: Changing types on the fly in select queries?

2005-12-27 Thread Paul DuBois
At 12:48 -0600 12/27/05, Jay Paulson \(CE CEN\) wrote: I have a strange question for you all. I've inherated some code and the way the code works is that I can only mess with the WHERE part of a query. Therefore, I was wondering if something like this would be possible. WHERE where

RE: Changing types on the fly in select queries?

2005-12-27 Thread James Harvard
WHERE where concat(year,period,week) as type int 2007031 Note that I'm trying to change the type of what the concat() is doing. Is this even possible? If so is it possible to do it in the WHERE? You can cast data tyes explicitly: http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html The

RE: Changing types on the fly in select queries?

2005-12-27 Thread Jay Paulson \(CE CEN\)
You can cast data tyes explicitly: http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html Now that is cool. Too bad we are using MySQL 3.23.x on our production box. I can't use it. :( If this table is going to get large then you might find it too slow to use that method. Your query

RE: Changing types on the fly in select queries?

2005-12-27 Thread Jay Paulson \(CE CEN\)
You might be able to use the CAST() function. http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html Unfortunately our producation machine is using MySQL 3.23.x and from what I've found the cast() function isn't available. :( CAST() and CONVERT() are available as of MySQL 4.0.2.

Mysql 4.0 always executes case insensitive queries

2005-12-12 Thread Nico Sabbi
Hi, my mysql always executes case insensitive queries: SELECT username FROM workflow.user WHERE username = 'NicO' LIMIT 1; +--+ | username | +--+ | nico | +--+ 1 row in set (0.01 sec) that field is of varchar(255) type. I don't understand the reason

Re: Mysql 4.0 always executes case insensitive queries

2005-12-12 Thread Wolfram Kraus
Nico Sabbi wrote: Hi, my mysql always executes case insensitive queries: SELECT username FROM workflow.user WHERE username = 'NicO' LIMIT 1; +--+ | username | +--+ | nico | +--+ 1 row in set (0.01 sec) that field is of varchar(255) type. I don't understand

Re: Mysql 4.0 always executes case insensitive queries

2005-12-12 Thread Shen139
You should use: SELECT username FROM workflow.user WHERE username LIKE BINARY 'NicO' LIMIT 1; reference: http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html On 12/12/05, Nico Sabbi [EMAIL PROTECTED] wrote: Hi, my mysql always executes case insensitive queries: SELECT

Re: recursive queries

2005-12-09 Thread Gleb Paharenko
this, but just wondered if there are any functions in MySQL that make this easier, or specific functions available to stored procedures. I have read the manual and couldn't find anything, but thought I would ask. I notice that the new MS SQL Server has support for recursive queries

Re: recursive queries

2005-12-09 Thread Eric Bergen
and couldn't find anything, but thought I would ask. I notice that the new MS SQL Server has support for recursive queries and oracle also, so I thought maybe... Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

recursive queries

2005-12-08 Thread Duncan Miller
Title: DIY MTB Is there any built in or other support for recursive queries . I suspect not, but wonder what is considered the best approach. With stored procedures being supported in 5.0 is that the way to handle these. Thanks -- Duncan Miller [EMAIL PROTECTED] www.diymtb.com.au

Re: recursive queries

2005-12-08 Thread SGreen
Duncan Miller [EMAIL PROTECTED] wrote on 12/08/2005 06:40:55 AM: Is there any built in or other support for recursive queries . I suspect not, but wonder what is considered the best approach. With stored procedures being supported in 5.0 is that the way to handle these. Thanks

Re: recursive queries

2005-12-08 Thread Duncan Miller
anything, but thought I would ask. I notice that the new MS SQL Server has support for recursive queries and oracle also, so I thought maybe... Thanks

Executing multiple queries at a time in Query Browser

2005-11-26 Thread Colin Shreffler
Does anyone know how to separate queries so that I can run multiple insert statements at once? For example, from within MySQL Query Browser, I want to load a file containing multiple inserts and then run it. It errors however on trying to run the following queries: insert into project_type

Re: Executing multiple queries at a time in Query Browser

2005-11-26 Thread SGreen
Colin Shreffler [EMAIL PROTECTED] wrote on 11/26/2005 04:44:26 PM: Does anyone know how to separate queries so that I can run multiple insert statements at once? For example, from within MySQL Query Browser, I want to load a file containing multiple inserts and then run it. It errors

Two fast queries combined = slow?

2005-11-22 Thread David Hillman
This makes no sense to me, please explain if you can. I have two queries, both run in under a tenth of a second. But, when one is run as a sub-query of the other, run time is essentially infinite ( I haven't had that much patience, yet ). For example, although

Re: Two fast queries combined = slow?

2005-11-22 Thread David Hillman
You are the man, Joe. The wall next to my desk thanks you, for stopping me from continuing to beat my head against it. -- David Hillman LiveText, Inc 1.866.LiveText x235 On Nov 22, 2005, at 7:50 PM, Joseph Cochran wrote: Subqueries in 1.4.14 don't use indexes, instead performing full-

Re: JBoss queries aren't cached by MySQL

2005-10-07 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Al Caponi wrote: Hi again, The query cache finally works after I've reverted to mm.mysql-2.0.12-bin.jar. The problem was that the query cache somehow wouldn't work within transactions with mysql-connector-java-3.1.10-bin.jar. Anyone care to

RE: JBoss queries aren't cached by MySQL

2005-10-06 Thread Al Caponi
Hi again, The query cache finally works after I've reverted to mm.mysql-2.0.12-bin.jar. The problem was that the query cache somehow wouldn't work within transactions with mysql-connector-java-3.1.10-bin.jar. Anyone care to dig further? Here is one working combination: Jboss 3.2.2 with

variable table names in queries ...

2005-10-05 Thread C.R. Vegelin
Hi, I am looking for a method to use variable table names. I have various download-tables, all having the same structure. All I want is to run a series of queries on each of these tables. I tried SET @mytable = 'Download200501'; SELECT count(*) FROM @mytable; but this doen't work. Is there any

Re: variable table names in queries ...

2005-10-05 Thread Jigal van Hemert
C.R. Vegelin wrote: Hi, I am looking for a method to use variable table names. I have various download-tables, all having the same structure. All I want is to run a series of queries on each of these tables. I tried SET @mytable = 'Download200501'; SELECT count(*) FROM @mytable

RE: JBoss queries aren't cached by MySQL

2005-10-05 Thread Al Caponi
as follows: query_cache_limit=2M query_cache_size=32M query_cache_type=1 However, after triggering a few queries from my applications, the query cache is not used at all: SHOW STATUS LIKE 'Qcache%'; Qcache_queries_in_cache,0 Qcache_inserts,0 Qcache_hits,0 Qcache_lowmem_prunes,0 Qcache_not_cached

RE: JBoss queries aren't cached by MySQL

2005-10-05 Thread Al Caponi
, 2005 8:35 PM To: mysql@lists.mysql.com Subject: RE: JBoss queries aren't cached by MySQL Hi All, I didn't see any follow-up on this thread. Hope I can get some hint :) How to get the query cache to work with Jboss? I've got my app running on the following JBoss 3.2.2. (Unable to upgrade right now

Re: JBoss queries aren't cached by MySQL

2005-10-05 Thread Gleb Paharenko
Hello. If you can just check your application with the latest release of MySQL (4.1.14 now). Turn on the general log to be sure that MySQL receives unchanged queries and no session variables has been changed. Al Caponi [EMAIL PROTECTED] wrote: Hi All, I didn't see any follow-up

RE: JBoss queries aren't cached by MySQL

2005-10-05 Thread Al Caponi
Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 9:07 PM To: mysql@lists.mysql.com Subject: Re: JBoss queries aren't cached by MySQL Hello. If you can just check your application with the latest release of MySQL (4.1.14 now). Turn on the general log

RE: timing queries?

2005-10-01 Thread Sujay Koduri
, October 01, 2005 1:20 AM To: mysql@lists.mysql.com Subject: timing queries? Hi, Does anyone know how to execute SQL statements from a text file such that the summaries X rows in set (X.YZ sec) are printed for each query? Neither of these do it: mysql batch-file mysql -e 'source batch-file

Re: timing queries?

2005-10-01 Thread Roger Baklund
Jacek Becla wrote: Hi, Does anyone know how to execute SQL statements from a text file such that the summaries X rows in set (X.YZ sec) are printed for each query? Neither of these do it: mysql batch-file mysql -e 'source batch-file' If you add verbosity using the parameter -vv (or -v

timing queries?

2005-09-30 Thread Jacek Becla
Hi, Does anyone know how to execute SQL statements from a text file such that the summaries X rows in set (X.YZ sec) are printed for each query? Neither of these do it: mysql batch-file mysql -e 'source batch-file' 'source batch-file' run inside mysql command-line does it, but then I

Re: are concurent queries serialized ?

2005-09-29 Thread Gleb Paharenko
of concurent connection/queries go high, the DB server runs very slowly. while trying to find a fix to this problem, I've been told that whatever the nu mber of concurent queries the DB server receive, it process them thru a queue, that no more than 1 query may be performed

are concurent queries serialized ?

2005-09-28 Thread Bru, Pierre
hi, I run a web server on a linux box from which PHP connect to a mySQL 4 server running on another linux box. tis works well but when the number of concurent connection/queries go high, the DB server runs very slowly. while trying to find a fix to this problem, I've been told that whatever

Re: Too Many Queries Have Writing To Net Status [mysql performance tuning]

2005-09-11 Thread Josh Chamas
be 1 in 1 queries take mote than 3 seconds to execute (slow_query_time), and the status of the query is always writing to net Initially the NIC was an Intel 10/100, then the slow queries were a lot more, then I started using the Broadcom Gigabit port that comes with the 2650, and recently I also

Getting Record Count w/o doing 2 queries.

2005-09-07 Thread pow
Hi everyone, Im executing the following query: SELECT * FROM table1 WHERE table1.field1 = 'A' AND table1.field2 = 'B' LIMIT 0,10 I also need to get the total record count for the above query, but without the limit clause (limit is for pagination purposes) Is there any way to extract this total

Re: Getting Record Count w/o doing 2 queries.

2005-09-07 Thread Eric McGrane
After you execute your select/limit statement you can execute select found_rows() It returns the number of rows thbat the previous query would have returned if the limit wasn't applied. See: http://dev.mysql.com/doc/mysql/en/information-functions.html. Regards, E Hi everyone, Im

Re: Getting Record Count w/o doing 2 queries.

2005-09-07 Thread Brent Baisley
Just add SQL_CALC_FOUND_ROWS to your select statement: SELECT SQL_CALC_FOUND_ROWS COUNT(*)...; The you can execute a special query to figure out how many rows would have been returned without the LIMIT clause. SELECT FOUND_ROWS(); On Sep 7, 2005, at 6:15 AM, pow wrote: Hi everyone, Im

Re: Getting Record Count w/o doing 2 queries.

2005-09-07 Thread Gleb Paharenko
Hello. You want to check out the FOUND_ROWS() function: http://dev.mysql.com/doc/mysql/en/information-functions.html BTW, similar question was asked recently. pow [EMAIL PROTECTED] wrote: Hi everyone, Im executing the following query: SELECT * FROM table1 WHERE

Re: Getting Record Count w/o doing 2 queries.

2005-09-07 Thread SGreen
RTFM - It is online, it has an index, and it is searchable: http://dev.mysql.com/doc/mysql/en/select.html (hint: look for the phrase how many rows on this page) If you looked in the index for rows, you would find the function ROW_COUNT() (which is close but not exactly what you wanted).

Re: Getting Record Count w/o doing 2 queries [sorry, left out one major piece of info]

2005-09-07 Thread pow
Very sorry for having troubled all regarding the seemingly stupid rtfm garnering request for help. But in my attempt to make the question as simple and succinct as possible, i forgot to state one EXTREMELY important chunk of information. I can't use SQLCALCFOUNDROWS because there is a subqry

Re: Getting Record Count w/o doing 2 queries [sorry, left out one major piece of info]

2005-09-07 Thread SGreen
Then eliminate the subquery and SQL_CALC_FOUND_ROWS will be an option for you again. If you would like some help refactoring your query, I volunteer. If I can't help, I know there are several others on the list just as capable as I (or more so). Shawn Green Database Administrator Unimin

Slow Queries Log and Index-less queries

2005-08-30 Thread HMax
Hey list, I have a question regarding the slow queries log, and queries not using index. I have a small table, with say 10 entries, like that : ID | Element - 1 | One 2 | Two 3 | Three 4 | Four 5 | Five 6 | Six 7 | Seven 8 | Eight 9 | Nine 10 | Ten I want to get

Re: Slow Queries Log and Index-less queries

2005-08-30 Thread Alexey Polyakov
I have a question regarding the slow queries log, and queries not using index. I have a small table, with say 10 entries, like that : ID | Element - 1 | One 2 | Two 3 | Three 4 | Four 5 | Five 6 | Six 7 | Seven 8 | Eight 9 | Nine 10 | Ten I want to get all

Re[2]: Slow Queries Log and Index-less queries

2005-08-30 Thread HMax
Thanks Alexey, This is enough explanation for me ;) Cheers, HMax AP I have a question regarding the slow queries log, and queries not using index. AP I have a small table, with say 10 entries, like that : AP ID |  Element AP - AP 1  |  One AP 2  |  Two AP 3  |  Three AP 4

Too Many Queries Have Writing To Net Status

2005-08-29 Thread Kishore Jalleda
Hi All, We have a production Database, running mysql 4.0.17 , on a Poweredge 2650 with 3 GB RAM, and dual Xeon 2.4 GHZ, the server averages between 100 and 200 qps ( ,also and the CPU/MEM load is pretty low and is extremely fast except for once in a while may be 1 in 1 queries take

cache queries

2005-08-11 Thread Paco Martinez Rodriguez
Hi.. I'm using cache queries with MySQL 4.0.13 during three days and I get a little better speed. Value of Query_cache_size = 20 Mb. I have two questions. 1.- Is there any way to see which queries are being stored ?? 2.- How can I delay qcache_lowmen_pruenes ?? In three day values

Re: cache queries

2005-08-11 Thread Nuno Pereira
Paco Martinez Rodriguez wrote: Hi.. I'm using cache queries with MySQL 4.0.13 during three days and I get a little better speed. Value of Query_cache_size = 20 Mb. This is 20 Mega Bits. I suppose you meant to mean 20 MegaBytes (20MB), or even 20 Mibibytes (20MiB). I have two questions

Re: cache queries

2005-08-11 Thread Gleb Paharenko
. Paco Martinez Rodriguez [EMAIL PROTECTED] wrote: Hi.. I'm using cache queries with MySQL 4.0.13 during three days and I get a little better speed. Value of Query_cache_size =3D 20 Mb. I have two questions.=20 1.- Is there any way to see which queries are being stored ?? 2

Calling Stored Procedures with MS Access Pass-Through Queries

2005-08-09 Thread Kent Roberts
Has anyone had experience with this yet? My attempts so far render ODBC--call failed. My connection is good and I can use select statements successfully, but no luck with calling an SP yet. I really want to call an SP with parameters, but I'm trying a simple one first. Also, anyone know of a

RE: Calling Stored Procedures with MS Access Pass-Through Queries

2005-08-09 Thread Kent Roberts
It might help if I mention my syntax is: call spTestingStuff(); From: Kentnbsp;RobertsDate: August 9 2005 6:24pm Subject: Calling Stored Procedures with MS Access Pass-Through Queries Has anyone had experience with this yet? My attempts so far render = ODBC--call failed. My connection is good

Re: Calling Stored Procedures with MS Access Pass-Through Queries

2005-08-09 Thread SGreen
Kent Roberts [EMAIL PROTECTED] wrote on 08/09/2005 12:24:11 PM: Has anyone had experience with this yet? My attempts so far render ODBC--call failed. My connection is good and I can use select statements successfully, but no luck with calling an SP yet. I really want to call an SP with

Re: Calling Stored Procedures with MS Access Pass-Through Queries

2005-08-09 Thread Kent Roberts
Thanks Shawn. I'm actually trying using Access's Pass-Through Query technology which utilizes ODBC. I'm not sure if it's ADO or DAO. I'll guess ADO since that's the default for this version of Access (2002). I haven't tried connecting in code yet, but that's coming soon. I've had a lot of

Re: Calling Stored Procedures with MS Access Pass-Through Queries

2005-08-09 Thread Daniel Kasak
Kent Roberts wrote: Has anyone had experience with this yet? My attempts so far render ODBC--call failed. My connection is good and I can use select statements successfully, but no luck with calling an SP yet. I really want to call an SP with parameters, but I'm trying a simple one first.

Number of SQL Queries curiosity

2005-08-05 Thread Gordon Bruce
We have a relatively small web site running 4.0.20 on a Dell 2850 running RedHat. We rarely see any SQL statements visible when we run SHOW PROCESSLIST and typically use 30 - 40 concurrent connections. The Number of SQL Queries graph in MySQL Administrator usually is in the 0 to 10 range

Re: storing php pages with sql queries in a mysql database

2005-07-25 Thread Eugene Kosov
Gregory Machin wrote: Hi all. I'm writing a php script to store the contents of html and php pages in a data base, it works well until there are mysql queries in the pages source then give errors such as this one. Query failed: You have an error in your SQL syntax near 'temp' how do stop

Re: storing php pages with sql queries in a mysql database

2005-07-25 Thread Lamont R. Peterson
On Saturday 23 July 2005 09:05am, Gregory Machin wrote: Hi all. I'm writing a php script to store the contents of html and php pages in a data base, it works well until there are mysql queries in the pages source then give errors such as this one. Query failed: You have an error in your SQL

Re: more queries vs a bigger one

2005-07-24 Thread Octavian Rasnita
, sc.category from articles a, newspapers n, sections_categories sc where a.id_newspapers=n.id and a.id_categories=sc.id and a.active_view=1 and a.id_categories=20 limit 0,30; For each of those 30 records which are returned, I make other 3 queries: select count(*) from articles_comments where hash_articles

storing php pages with sql queries in a mysql database

2005-07-23 Thread Gregory Machin
Hi all. I'm writing a php script to store the contents of html and php pages in a data base, it works well until there are mysql queries in the pages source then give errors such as this one. Query failed: You have an error in your SQL syntax near 'temp' how do stop mysql from trying

Re: storing php pages with sql queries in a mysql database

2005-07-23 Thread Ludwig Pummer
Gregory Machin wrote: Hi all. I'm writing a php script to store the contents of html and php pages in a data base, it works well until there are mysql queries in the pages source then give errors such as this one. Query failed: You have an error in your SQL syntax near 'temp' how do stop

Re: more queries vs a bigger one

2005-07-19 Thread Octavian Rasnita
From: [EMAIL PROTECTED] Subject: Re: more queries vs a bigger one 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

Re: more queries vs a bigger one

2005-07-19 Thread SGreen
Octavian Rasnita [EMAIL PROTECTED] wrote on 07/19/2005 02:45:58 AM: From: [EMAIL PROTECTED] Subject: Re: more queries vs a bigger one 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

Re: more queries vs a bigger one

2005-07-18 Thread Gleb Paharenko
Hello. It is a hard task to answer if we don't see your queries and tables' structure. Sometimes several small queries could be faster than a big one. For example, often, query with subqueries or union runs slower than few queries which use temporary tables. Octavian Rasnita [EMAIL

more queries vs a bigger one

2005-07-17 Thread Octavian Rasnita
Hi, I have a big query that involves searching in more tables, and I think this might be slower than creating more smaller queries. What do you think, is this true generally? The query searches in a big table but it also counts the number of records from other 2 tables based on a criteria

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