RE: SLOW 22million rows, 5 hour query?

2004-04-24 Thread Donny Simonton
Cliff, still no explain still not table structure. Until that happens enjoy the 5 hour club. Donny > -Original Message- > From: Cliff Daniel [mailto:[EMAIL PROTECTED] > Sent: Saturday, April 24, 2004 6:41 PM > To: Donny Simonton > Cc: 'Tim Cutts'; [EMAIL PROTECTED] > Subject: Re: SLOW 22

Re: SLOW 22million rows, 5 hour query?

2004-04-24 Thread Cliff Daniel
http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html " Do not use DELAYED with INSERT ... SELECT. " With respect to the table structure...can you explain how when you have to read every single row regardless how the structure (assuming you are going down the path of idexes) affects the query? C

Trying to upgrade

2004-04-24 Thread Randy
Hello, I have seen lots of these same errors but no real solutions. Hopefully you can help me out I am trying to upgrade an existing Mysql install from mysql-3.23.58-1.9 to the latest mysql-4 When I try to run the upgrade RPM I get rpm -Uv MySQL-server-4.0.18-0.i386.rpm warning: MySQL-server-

Re: display

2004-04-24 Thread Johannes Franken
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2004-04-24 19:40 +0200]: > I want to know if there is a way to change the display of the mysql > query results. If you're under GNU/Linux, type "\P less -S" at the mysql prompt. This sets the pager to "less", which allows you to use the four cursor keys f

display

2004-04-24 Thread lga2
hi, I want to know if there is a way to change the display of the mysql query results. itz confusing to see if you have a lot of fields in the table. and if the string is a long string for a particular string there are lot of lines that are being printed. Liz -- MySQL General Mailin

Re: SLOW 22million rows, 5 hour query?

2004-04-24 Thread Cliff Daniel
I must have done a poor job at explaining this. I already have all those primary keys, etc. If you are required to do a full table scan on the table, as I am in my example, please explain to me how an index even matters in that case. There is _no_ "where" clause in the query so how will an ind

Re: Unixware 7.1.0 compile error... mysql 4.0.18

2004-04-24 Thread Boyd Lynn Gerber
On Fri, 23 Apr 2004, Steven Palm wrote: > Well, using gcc-3.3_branch and UnixWare 7.1.0, I tried the dev release > 4.1.1-alpha off the mysql site to see if I would have better luck You need the latest bk http://dev.mysql.com/doc/mysql/en/Installing_source_tree.html You can run bk under t

Re: first LIMIT then ORDER

2004-04-24 Thread Jigal van Hemert
From: "Anders Karlsson" <[EMAIL PROTECTED]> > And by the way, in a UNION, there is no need to put parenteses around > the unioned queries in the general case. So > (SELECT .) UNION (SELECT) [ORDER BY ] > Is the same as > SELECT . UNION SELECT [ORDER BY ] > I say in the gene

Index Question

2004-04-24 Thread jeff . gunther
Hello, I'm trying to create some summary data using some existing InnoDB tables and I'm running into performance issues. Here is the query: select topicx, count(*) from BillVote t1 left join BillVotestudentRelation t3 on t1.mvcoid=t3.idstudent_p left join Student t2 on t3.idstudent_c=t2.mvcoi

MySQL Audit Checklist/Program

2004-04-24 Thread Hassan Shaikh
Hi, Is there any recommended MySQL Auditing guideline available somewhere on the Net? (Anything other then the recommededation mention in the official documentation). If there's any IT Auditor out there who would like to share his/her work? Thanks. Hassan -- MySQL General Mailing List For li

RE: SLOW 22million rows, 5 hour query?

2004-04-24 Thread Donny Simonton
Use insert delayed, and you will cut your time in half. At least with my experience. But also how long does it actually take to run the query itself. Giving a summary explain doesn't help much. You really need a table structure that the select is using and a full explain. Donny > -Origina

Re: first LIMIT then ORDER

2004-04-24 Thread Anders Karlsson
As I stated before, my guess that duplicates are removed is because the SELECT is handled like one part of a UNION (I'll have a look at the code later to check if this is the case). Really, a UNION should consist of two or more SELECTs, so this is not the expected behaviour. The way this REALLY

Re: SLOW 22million rows, 5 hour query?

2004-04-24 Thread Tim Cutts
On 23 Apr 2004, at 9:48 pm, [EMAIL PROTECTED] wrote: Relevant `explain` details: Full table scan: 22,371,273 rows, Using temporary; Using filesort The filesort is a giveaway. Can you increase the sort buffer size so that the sort can happen in memory rather than having to use a file to sort? T

RE: Compound Primary Key question

2004-04-24 Thread Matt Chatterley
As Jeremy says - it depends totally on what you want to do. If you have tables where there is no logical, unique way to identify that column (or the only way to do so is via a column you do not want to use for this purpose), then assigning a separate ID column as a PK makes sense. E.g: If you hav

Re: first LIMIT then ORDER

2004-04-24 Thread Jigal van Hemert
> I find by experiment that > (select * from FOO order by a desc limit 10) order by a; > removes duplicates, but, if I drop the second order clause, > (select * from FOO order by a desc limit 10); > duplicates are retained. > > Why is the first a union, but not the second? Just curious. On ht

Re: first LIMIT then ORDER

2004-04-24 Thread Bill Easton
Interesting comment. I find by experiment that (select * from FOO order by a desc limit 10) order by a; removes duplicates, but, if I drop the second order clause, (select * from FOO order by a desc limit 10); duplicates are retained. Why is the first a union, but not the second? Just curiou

Re: SLOW 22million rows, 5 hour query?

2004-04-24 Thread Jigal van Hemert
> insert into new_table > select month_day, floor(bucket/3) as bucket, date, src, avg(value) as > value > from source_table > group by month_day, bucket, src; > > Relevant `explain` details: > Full table scan: 22,371,273 rows, Using temporary; Using filesort > > Query OK, 11495208 rows affected (4

Re: mysql as a spatial database backend

2004-04-24 Thread Jigal van Hemert
> Ive posted thsi query twice and got no reply - Im sure somebody must know > thw answer!!! > > whast the field length limitations for insertion of a WKT string into a > geometry column? Maybe it's because 1) not many people use spatial data in MySQL 2) the question is rather theoretical > yours,