Re: Select mit Subselect Problem

2007-12-17 Thread Kevin Hunter
At 7:45a -0500 on 17 Dec 2007, Marcus Füg wrote: > Tabelle Sales (s) mit jede Menge Abverkaufsdaten. > ArtikelNr,Kassenbon,HändlerID,Datum > > Jetzt sollen alle zu einem gekauften Artikel ebenfalls augelistet > werden, d.h. was wurde mit dem Artikel zusätzliche gekauft > > Bisher habe ich das mit

Re: Performance problem - MySQL at 99.9% CPU

2008-01-08 Thread Kevin Hunter
At 6:47a -0500 on 08 Jan 2008, Gunnar R. wrote: Concerning slow queries, it seems there's a couple of different queries that's being logged. I haven't tried it yet, but this recently went by on debaday.debian.net: mytop: a top clone for MySQL http://debaday.debian.net/2007/12/26/mytop-a-top-

Re: Performance problem - MySQL at 99.9% CPU

2008-01-08 Thread Kevin Hunter
At 3:51p -0500 onGunnar R. wrote, On 01/08/2008 03:51 PM: That tool tells me 100% of the data is read from memory, not a byte from disk... would there still be any point in getting more memory? Any suggestions to where to go from here? I dunno. My hunch is that could do some query optimizat

Re: MySql at 100% CPU

2008-01-17 Thread Kevin Hunter
At 3:25a -0500 on 17 Jan 2008, Ben Clewett wrote: I need to know why MySql does this. If any person knows how I an identify the problem, please let me know! I think this package helped another person out on this list a couple days ago: http://debaday.debian.net/2007/12/26/mytop-a-top-clone-

Re: Prepared SQL statements - Faster performance?

2008-01-17 Thread Kevin Hunter
I can't speak to the exact internals of MySQL, but in database practice one *generally* uses prepared statements for two reasons: 1. Security 2. Speed If your system is at all exposed to the outside world *and you at all value your data*, your biggest concern should /absolutely/ be security.

Re: MySql at 100% CPU

2008-01-17 Thread Kevin Hunter
At 12:08p -0500 on 17 Jan 2008, Ben Clewett wrote: The package you show gives the same output as the 'SHOW PROCESSLIST' output, which I included in my previous email :) Heh, that'll teach me to actually /use/ the package before recommending it. :-P (I just found out about it when that article

Re: basic style shema question

2008-01-18 Thread Kevin Hunter
At 11:44a -0500 on 18 Jan 2008, Alex K wrote: To summarize one table vs. many tables with one to one relations? As per usual, it depends on your needs. For most flexibility, and to give the DB the best chance to give the best plan for the possible requests I might make in the future, I gener

Re: basic style shema question

2008-01-18 Thread Kevin Hunter
Hmm. If we're talking pure DB theory, then the whole point is to apply the DRY principle as much as possible. At the point you have multiple copies of the same data, unless your programmers are perfect (and they aren't, I promise), you *will* have stale data. Better to have only one place to

Re: Comma's in data?

2008-03-08 Thread Kevin Hunter
At 12:23a -0500 on Sat, 08 Mar 2008, obed wrote: > Use \ to escape. > > mysql> insert into table1 values ('algo\,otra'); As an aside, I'm curious why the parser doesn't understand that the comma is part of the string in this context? It's already between two single quotes ... ? Shouldn't that b

Re: Table Structure

2008-05-16 Thread Kevin Hunter
At 2:49a -0400 on Fri, 16 May 2008, Ananda Kumar wrote: > it goes without saying Eh, not to those who don't know. Hence the list and question. :-D Krishna, the short answer is that it depends on your data, and the queries against it that you run. Test/benchmark on your own DB and data to see w

Re: Table Structure

2008-05-16 Thread Kevin Hunter
At 5:32a -0400 on Fri, 16 May 2008, Ananda Kumar wrote: >>> 2 Index would do range scan, which would be comparitivly slower. >> >> Not exactly. This, again, depends on implementation and the >> data against which queries are run. An index is an index. >> Remember, a primary key is implemented by

Re: Looking for a Mysql Guru/DBA

2008-05-22 Thread Kevin Hunter
At 1:43p -0400 on Wed, 21 May 2008, bruce wrote: > The basic goal of the project is to be able to track the sites that I'm > visiting via a Firefox extension. I want to be able to implement something > like the "breadcrumbs" extension, but I want to be able to go a lot further. If this is for a on

Re: Adding index to Memory table LOSES ROWS!

2008-07-26 Thread Kevin Hunter
At 5:52p -0400 on Fri, 25 Jul 2008, mos wrote: [Adding index to memory table silently loses data] First thing, what version are you using? Second thing, although it would still be broken, did you read the MySQL docs to make sure that the Memory table type supports the index *type* you attempted t

Re: Adding index to Memory table LOSES ROWS!

2008-07-27 Thread Kevin Hunter
At 12:42p -0400 on Sat, 26 Jul 2008, mos wrote: > At 09:14 AM 7/26/2008, you wrote: >> The reproducible part is very important, because without it, it's >> suspect to be just your individual case, as with a bug in *your* >> application code, your hardware, or generally something in your setup. > >

Re: Normalization vs. Performance

2008-08-28 Thread Kevin Hunter
At 2:11pm -0400 on Tue, 26 Aug 2008, John Smith wrote: > So how bad is this? The mentioned query will be the query which is used > the most in my application (yes, it is going to be a forum). > Should I break normalization and save the date of the root in each node row? My recommendation is no. N

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: binary into blob

2007-03-07 Thread Kevin Hunter
On 07 Mar 2007 at 3:57p -0500, Alexander Lind wrote: imagine a large system where pdf-files are accessed by clients a lot. say 1 pdf file is access per second on average. also say that your database is on a machine separate from the webserver(s) (as is common). do you really think its a good

Re: about limit

2007-03-20 Thread Kevin Hunter
On 20 Mar 2007 at 12:50p -0400, nikos wrote: Does any body knows how to select not the LIMIT 20 records but the rest of them? MySQL version is 4.1.21-standard and I cant make a VIEW. In Venn-speak, you are asking for Circle A less(, minus, or subtract) Circle B. In SQL, this would transla

Re: IS NULL Question

2007-05-01 Thread Kevin Hunter
At 9:06p -0400 on 30 Apr 2007 John Kebbel wrote: I'm having problems understanding NULL. I grasp what a NULL value is, A NULL value is rather an oxymoron. It'd be more accurate to say that NULL means "absence of a value". but I can't get NULL to perform correctly. For instance, if I do a

Re: IS NULL Question

2007-05-01 Thread Kevin Hunter
Caveat emptor: I haven't tested this in about a year. Are you perchance using a table type of MyISAM? I seem to recall that MyISAM has a hard time actually representing NULL internally. [ ... Thinks for a minute ... ] I remember something about spaces, like, I think I did INSERT ( val

Re: Table compression with write (append) support

2007-05-28 Thread Kevin Hunter
At 12:31a -0400 on 28 May 2007, Dan Nelson wrote: > In the last episode (May 27), Yves Goergen said: >> I'm thinking about using a MySQL table to store an Apache access log >> and do statistics on it. Currently all access log files are stored as >> files and compressed by day. Older log files are c

Re: Table compression with write (append) support

2007-05-28 Thread Kevin Hunter
At 5:45a -0400 on 28 May 2007, Yves Goergen wrote: > On 28.05.2007 09:06 CE(S)T, Kevin Hunter wrote: > >> In particular, I imagine a lot of the HTTP requests would be the >> same, so you could create a table to store the requested URLs, and >> then have a second tabl

Re: MySQL Magazine - Issue 1 available NOW!!!!

2007-06-11 Thread Kevin Hunter
At 5:53p -0400 on 11 Jun 2007, Gordan Bobic wrote: I don't understand this never-ending fascination with re-inventing a square wheel for an application for which the standard round type has already been kindly provided since year dot. I imagine the reason for this "never-ending fascination .