Re: Fwd: Why dont my query use the index keys?

2008-09-17 Thread chandru
Hi Dilip,   I dont think forcing MySQL to use Index can improve your performance. MySQL decides on the index to be used based on the cardinality. Since the cardinality is low MySQL has chosen a Index that can give the best performance. Forcing that can only increase the volume of data that is f

RE: Fwd: Why dont my query use the index keys?

2008-09-17 Thread Parikh, Dilip Kumar
OR Try Using this query ...Just a try SELECT COUNT(*) antal, ad.ad_url, ad.adtext_plain FROM ad use index(index_name) LEFT JOIN tag_ad_map tm ON concat(tm.ad_id=ad.ad_id) WHERE tm.tag_id IN (99, 10807, 20728, 447, 807) AND (ad.is_removed = 0 AND ad.is_active=1 AND (ad.ant_feedback_alert <

RE: Fwd: Why dont my query use the index keys?

2008-09-17 Thread Parikh, Dilip Kumar
Hi johan, U can use and try to write a query to use index in it (like use index(index name) before where condition. And other variables also looks like ok seems let me check, Please try to send the output of global status. Show global status; Thanks & Regards, Dilipkumar -Original Messa

Re: Why dont my query use the index keys?

2008-09-17 Thread chandru
Hi johan, you have allocated 4M for your sort buffer size is ok. So i feel that the query is loading more than 4MB of data so it is creating a temporary file to do a sorting. please try to put some logic into the query that you use to load the appropriate data. I find that the tag_id has a car

Re: Why dont my query use the index keys?

2008-09-17 Thread Johan Thorvaldsson
mysql> show global variables like 'sort%'; +--+-+ | Variable_name| Value | +--+-+ | sort_buffer_size | 4194296 | +--+-+ 1 row in set (0.01 sec) 18 sep 2008 kl. 08.05 skrev chandru: Hi Johan, the query is going for a t

Re: Fwd: Why dont my query use the index keys?

2008-09-17 Thread chandru
Hi Johan, the query is going for a temporary table creation "Using temporary; Using filesort" In case your sort_buffer_size is too low please try increasing the same. Be cautious don't try to increase it massively, since it is a per thread memory allocation. please let me know what is you

Re: MySQL not running on fresh LAMP install

2008-09-17 Thread Dave M G
Glyn, Thank you for responding. To start with, check that the .pid file doesn't exist if the server is stopped Part of the problem is that I can't stop the server. $ sudo /etc/init.d/mysql stop * Stopping MySQL database server mysqld [fail] try running it manually with "/etc/init.d/mysql

Re: valid chars mysql db username

2008-09-17 Thread Peter Brawley
>Thanks, but is there any technical reason where using "@" might break something? >However if there's even the slightest risk of an implosion, naturally we will not. Eh? Did you read the manual page on identifiers? PB Res wrote: Hi Peter, On Wed, 17 Sep 2008, Peter Brawley wrote: I'm look

Re: valid chars mysql db username

2008-09-17 Thread Mr. Shawn H. Corey
On Thu, 2008-09-18 at 08:34 +1000, Res wrote: > Hi Peter, > > On Wed, 17 Sep 2008, Peter Brawley wrote: > > >> I'm looking at using the "@" symbol > > > > Don't. Restrict yourself to alphanums and '_'. > > Thanks, but is there any technical reason where using "@" might break > something? Howeve

Re: Finding gaps

2008-09-17 Thread Mr. Shawn H. Corey
On Wed, 2008-09-17 at 23:29 +0100, Stut wrote: > On 17 Sep 2008, at 22:34, Jerry Schwartz wrote: > > Our Japanese partners will notice and will ask. Similar things have > > come up > > before. > > > > I want to be pro-active. > > Notice what? Why would it be bad? What type of data are we dealing

Re: Finding gaps

2008-09-17 Thread Stut
On 17 Sep 2008, at 22:34, Jerry Schwartz wrote: Our Japanese partners will notice and will ask. Similar things have come up before. I want to be pro-active. Notice what? Why would it be bad? What type of data are we dealing with here? If each row requires a unique ID use an autonumber. I

RE: Finding gaps

2008-09-17 Thread Martin Gainty
unless you cant spare a few milliseconds off of each insert.. i strongly suggest to use autoincrement http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html Martin __ Disclaimer and confidentiality note Everything in this e-mail and any

RE: Finding gaps

2008-09-17 Thread Jerry Schwartz
Our Japanese partners will notice and will ask. Similar things have come up before. I want to be pro-active. Regards,   Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032   860.674.8796 / FAX: 860.674.8341   www.the-infoshop.com www.giiexpress.

Re: Finding gaps

2008-09-17 Thread Peter Brawley
>Is there any elegant way of finding the gaps? You'll find some ideas under (and near) "Find missing numbers in a sequence" at http://www.artfulsoftware.com/infotree/queries.php. PB - Stut wrote: On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: I have records that should be sequentially

Re: Finding gaps

2008-09-17 Thread Stut
On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: I have records that should be sequentially (not auto-increment) numbered, but there are gaps. Is there any elegant way of finding the gaps? Why do they need to be sequential? When this requirement comes up it's usually for illogical reasons.

Finding gaps

2008-09-17 Thread Jerry Schwartz
I have records that should be sequentially (not auto-increment) numbered, but there are gaps. Is there any elegant way of finding the gaps? Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.834

Re: Show Master Status

2008-09-17 Thread David Giragosian
On Wed, Sep 17, 2008 at 12:47 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: > Hi, > > What's in the bin-logs? (mysqlbinlog ) > > cheers, > Doug > > Doug, We capture time-sensitive data, and after checking all the counts on tables known to accept inserts, I restarted the server. That stopped t

RE: Show Master Status

2008-09-17 Thread Martin Gainty
'new' england thanks/ Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to a

Re: Show Master Status

2008-09-17 Thread David Giragosian
On Wed, Sep 17, 2008 at 12:54 PM, Martin Gainty <[EMAIL PROTECTED]> wrote: > > Dave- > > we havent had a hurricane since up here since 1938..if you want to relocate > your servers just give a holler > and i'll lend you mine! > > Martin > __ Thanks, Mar

RE: Show Master Status

2008-09-17 Thread Martin Gainty
Dave- we havent had a hurricane since up here since 1938..if you want to relocate your servers just give a holler and i'll lend you mine! Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the off

RE: Show Master Status

2008-09-17 Thread [EMAIL PROTECTED]
Hi, What's in the bin-logs? (mysqlbinlog ) cheers, Doug Original Message: - From: David Giragosian [EMAIL PROTECTED] Date: Wed, 17 Sep 2008 12:38:01 -0500 To: mysql@lists.mysql.com Subject: Show Master Status Hurricane Ike has caused our replication set-up to misbehave. I'v

Show Master Status

2008-09-17 Thread David Giragosian
Hurricane Ike has caused our replication set-up to misbehave. I've stopped the (one and only) application that inserts data into the master, but show master status's 'position' field continues to increment. Have I missed something or is this unexpected behavior? version 5.0.22 on CentOS 5. Th

Re: Appropriate Design

2008-09-17 Thread Jeffrey Santos
Thank you, that was a very helpful discussion. I'm worried a bit about scalability. This is a personal project so I will be the primary user of the end-result; however, if it is robust enough, I'd like to open it up to a larger audience. This type of scheme doesn't seem to lend itself to easily

RE: Appropriate Design

2008-09-17 Thread Geert-Jan Brits
Hi Jeffrey, David already gave a lot of valid points. Table-per-documenttype seems the way to go here. As to the 'best' db-scheme for your task given your description you have to ask yourself a couple of questions: Please note that with a document-type I mean a type like book, html page, etc.

Re: Appropriate Design

2008-09-17 Thread David Ashley
On Wed, Sep 17, 2008 at 11:38 AM, Jeffrey Santos <[EMAIL PROTECTED]>wrote: > Hi David, > > My project involves storing information that could have been gathered from > wildly different sources. You can think of this part of the database as a > sort of bibliography for the sources of that informat

Re: Appropriate Design

2008-09-17 Thread Jeffrey Santos
Hi David, My project involves storing information that could have been gathered from wildly different sources. You can think of this part of the database as a sort of bibliography for the sources of that information. If I gathered information from a book, for instance, there are some generally r

Re: Appropriate Design

2008-09-17 Thread Jeffrey Santos
In my example given earlier which accounts for possible overlap in required fields, would your paragraph still apply? e.g., I would probably need all the field information every time I access a source type's requireds so that would fall under your description; however, that would mean having to ha

Re: MySQL not running on fresh LAMP install

2008-09-17 Thread Glyn Astill
> The mysqld.pid file is in /var/run/mysqld. > > The mysql.sock file is in /tmp > > > What symlink did you make? > None right now. I removed any that I had made before so > that I wouldn't > confuse the situation. > To start with, check that the .pid file doesn't exist if the server is stoppe

Re: MySQL not running on fresh LAMP install

2008-09-17 Thread Dave M G
Glyn, Thanks for responding. Does the .pid file exist in either /var/run/mysqld/ or /tmp/ at the moment? The mysqld.pid file is in /var/run/mysqld. The mysql.sock file is in /tmp What symlink did you make? None right now. I removed any that I had made before so that I wouldn't confuse t

Re: Appropriate Design

2008-09-17 Thread David Ashley
On Wed, Sep 17, 2008 at 5:46 AM, Jeffrey Santos <[EMAIL PROTECTED]> wrote: > I'm not sure if this is the right list to ask such a question; if not, any > direction as to the appropriate forum would be much appreciated! > > This may be a simple question, but I'm still on the early stages of my > le

Re: Appropriate Design

2008-09-17 Thread Brent Baisley
On Wed, Sep 17, 2008 at 7:19 AM, Kevin Hunter <[EMAIL PROTECTED]> wrote: > At 5:46am -0400 on Wed, 17 Sep 2008, Jeffrey Santos wrote: >> I'm developing an application >> that will require information from various sources. Since what >> might be considered required information about those sources w

Re: MySQL not running on fresh LAMP install

2008-09-17 Thread Glyn Astill
--- On Wed, 17/9/08, Dave M G <[EMAIL PROTECTED]> wrote: > From: Dave M G <[EMAIL PROTECTED]> > Subject: Re: MySQL not running on fresh LAMP install > To: mysql@lists.mysql.com > Date: Wednesday, 17 September, 2008, 12:51 PM > TLUG, > > Thanks for the helpful advice. > > Unfortunately I've hi

Re: valid chars mysql db username

2008-09-17 Thread Peter Brawley
>I'm looking at using the "@" symbol Don't. Restrict yourself to alphanums and '_'. PB Res wrote: Hi All, Does anyone have a reference to what is regarded a legal valid chars for the MySQL database username? You can imagine what google shows me, everything totally irrelevant, as usual. The

Re: Appropriate Design

2008-09-17 Thread Jeffrey Santos
Kevin, Thank you for the extensive reply, the information you provide makes perfect sense. I have read about normalization so was anticipating that choice #2 would probably be more appropriate. In terms of the specifics of the project... This portion of the database would act as a sort of biblio

Re: MySQL not running on fresh LAMP install

2008-09-17 Thread Dave M G
TLUG, Thanks for the helpful advice. Unfortunately I've hit an error I don't know what to do about. The symlink solution worked, but Ubuntu clears the /tmp directory on every boot. So I edited the my.cnf file to use /tmp/mysql.sock. But when I tried to restart MySQL, it kept saying "[fail]".

Re: Query Cache questions

2008-09-17 Thread Ananda Kumar
okie..got u On 9/17/08, Bard Aase <[EMAIL PROTECTED]> wrote: > > On Wed, Sep 17, 2008 at 12:42 PM, Ananda Kumar <[EMAIL PROTECTED]> wrote: > >>query_cache_limit is the maximum size of a single resultset in the > >> cache. If your query results in a bigger resultset it will never get > >> into the

Re: Appropriate Design

2008-09-17 Thread Kevin Hunter
At 5:46am -0400 on Wed, 17 Sep 2008, Jeffrey Santos wrote: > I'm developing an application > that will require information from various sources. Since what > might be considered required information about those sources will > vary (occasionally dramatically), I'm unsure as to the correct > desi

Re: Query Cache questions

2008-09-17 Thread Bard Aase
On Wed, Sep 17, 2008 at 12:42 PM, Ananda Kumar <[EMAIL PROTECTED]> wrote: >>query_cache_limit is the maximum size of a single resultset in the >> cache. If your query results in a bigger resultset it will never get >> into the cache even if its room for it in the cache itself. > > > > Even if there

Re: Query Cache questions

2008-09-17 Thread Ananda Kumar
>query_cache_limit is the maximum size of a single resultset in the > cache. If your query results in a bigger resultset it will never get > into the cache even if its room for it in the cache itself. Even if there is room why will it not fit into the cache. On 9/17/08, Bard Aase <[EMAIL PRO

Re: Query Cache questions

2008-09-17 Thread Bard Aase
On Wed, Sep 17, 2008 at 11:54 AM, Uwe Kiewel <[EMAIL PROTECTED]> wrote: > Bard Aase schrieb: >> On Wed, Sep 17, 2008 at 11:37 AM, Uwe Kiewel <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> I have two questions regarding the query cache: >>> >>> 1. What is the difference between query_cache_limit and que

Re: Query Cache questions

2008-09-17 Thread Uwe Kiewel
Bard Aase schrieb: > On Wed, Sep 17, 2008 at 11:37 AM, Uwe Kiewel <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have two questions regarding the query cache: >> >> 1. What is the difference between query_cache_limit and query_cache_size? > > query_cache_limit is the maximum size of a single resultset

Appropriate Design

2008-09-17 Thread Jeffrey Santos
I'm not sure if this is the right list to ask such a question; if not, any direction as to the appropriate forum would be much appreciated! This may be a simple question, but I'm still on the early stages of my learning about databases. I'm developing an application that will require information

Re: Query Cache questions

2008-09-17 Thread Bard Aase
On Wed, Sep 17, 2008 at 11:37 AM, Uwe Kiewel <[EMAIL PROTECTED]> wrote: > Hi, > > I have two questions regarding the query cache: > > 1. What is the difference between query_cache_limit and query_cache_size? query_cache_limit is the maximum size of a single resultset in the cache. If your query re

Query Cache questions

2008-09-17 Thread Uwe Kiewel
Hi, I have two questions regarding the query cache: 1. What is the difference between query_cache_limit and query_cache_size? mysql> show variables like '%query_cache%'; have_query_cache | YES | query_cache_limit| 1048576 | query_cache_min_res_unit | 4096 |