Matching subtables

2008-06-09 Thread Werner Van Belle
Hello, You might find the following challenging -or- you might now the answer :-) Table Q Subtable, field, val, ID A 1 a42 A 2 b42 B 1 a78 B 2 t78 B 3 o78 C 1 u23 Table R Subtableid, field,

Index/Range Problem?

2008-06-09 Thread Dave
Hi all, I've been trying to optimize some of our queries against a large database and come up against an index problem I haven't been able to find any documentation on. I've cut the query down to the bare minimum, and found the following -- explain Select iname,domain,serv,time from log where

Re: Index/Range Problem?

2008-06-09 Thread Ananda Kumar
what is the total no. of records in the table. Index will be used , if the query selects between 5 to 10% of the total records in the table. If its more than that then, optimizer will doing ALL scan, as it assumes doing ALL scan is faster than an INDEX SCAN. On 6/9/08, Dave [EMAIL PROTECTED]

mySQL support required

2008-06-09 Thread kishore.bhat
Hi , We are in Urgent need of support to recover from a database problem Details of our license product are as below License serial numbers is : 565076 Received on 19/Apr/006 The Problem detail is said below, We are not able to access the innodb data from the mysql Database .

Re: mySQL support required

2008-06-09 Thread Juan Eduardo Moreno
Hi Kishore, Please see the following approach : http://dschneller.blogspot.com/2007/09/error-1033-hy000-on-innodb.html Regards, Juan On Mon, Jun 9, 2008 at 8:26 AM, [EMAIL PROTECTED] wrote: Hi , We are in Urgent need of support to recover from a database problem Details of our

mysql query, min, max with where conditions

2008-06-09 Thread CRISTEA, Adrian
Hello there, What is the corect syntax for selecting something like: select a, b, (min(q) where date100), (max(q) where date100) from a left join b left join c group by a.p i need min() max() values each of them with other WHERE clause. How can I do that? Adrian. -- MySQL General Mailing

Dump problem

2008-06-09 Thread נור דאוד
Hello list, I have a problem dumping a database. The problem is that the database uses the swedish charset (historical, hosting provider didn't have all sets). The data itself is Arabic (windows-1256), and although I have no idea how it is stored inside the database's files, the website's

Serializing mySQLi result resource in PHP

2008-06-09 Thread Andrew Martin
Hello, Apologies for a slightly off topic PHP related post, the php-db mailing list has not been able to help with this so far. Is it possible to serialize a MySQL(i) result resource (specifically using PHP 5)? I am looking to insert query results into the eAccelerator cache but the resource

Filesort on query

2008-06-09 Thread Phil
I have a table as follows containing approx 1.5M rows. I pull data from it based on the CPID and insert into an 'overall' table. After breaking down the statement somewhat, an explain still gives a filesort. Is there any way to avoid a filesort for this query ? mysql explain select a.cpid

Re: Filesort on query

2008-06-09 Thread Gerald L. Clark
Phil wrote: I have a table as follows containing approx 1.5M rows. I pull data from it based on the CPID and insert into an 'overall' table. After breaking down the statement somewhat, an explain still gives a filesort. Is there any way to avoid a filesort for this query ? mysql explain select

Re: Filesort on query

2008-06-09 Thread Phil
Any settings which would let mysql do this in memory ? There is 8Gb Ram on the box dedicated for mysql. my.cnf snippet as follows old_passwords=1 key_buffer_size=2048M max_allowed_packet=16M thread_stack=128K thread_cache_size=64 thread_concurrency=8 sort_buffer_size=32M join_buffer_size=3M

Re: Filesort on query

2008-06-09 Thread Ananda Kumar
Hi Phil, Since u dont have where condition, doing a full table scan is better. in mysql, group by also does SORTING, as if you have specified an explicit ORDER BY. So you can avoid ORDER BY and see if the select are same with both group by and order by. But still you would see a FILESORT in the

Re: mysql query, min, max with where conditions

2008-06-09 Thread Sebastian Mendel
CRISTEA, Adrian schrieb: Hello there, What is the corect syntax for selecting something like: select a, b, (min(q) where date100), (max(q) where date100) from a left join b left join c group by a.p i need min() max() values each of them with other WHERE clause. How can I do that? sub

Re: Serializing mySQLi result resource in PHP

2008-06-09 Thread Sebastian Mendel
Andrew Martin schrieb: Hello, Apologies for a slightly off topic PHP related post, the php-db mailing list has not been able to help with this so far. Is it possible to serialize a MySQL(i) result resource (specifically using PHP 5)? no I am looking to insert query results into the

Re: Matching subtables

2008-06-09 Thread Sebastian Mendel
Werner Van Belle schrieb: Hello, You might find the following challenging -or- you might now the answer :-) Table Q Subtable, field, val, ID A 1 a42 A 2 b42 B 1 a78 B 2 t78 B 3 o78 C 1 u23

Re: Dump problem

2008-06-09 Thread Sebastian Mendel
נור דאוד schrieb: Hello list, I have a problem dumping a database. The problem is that the database uses the swedish charset (historical, hosting provider didn't have all sets). The data itself is Arabic (windows-1256), and although I have no idea how it is stored inside the database's files,