IN() subqueries in MySQL are badly optimized. It's usually better to
use a JOIN, even though it's non-standard:
DELETE geno_260k.*
FROM geno_260k
INNER JOIN (
SELECT ident FROM geno_260k
WHERE a1=0
GROUP BY ident HAVING count(*)>25
) AS der USING(ident);
Try profili
Thanks baron,
I will try this just for test purposes as I already wrote a script, which is
slow but not as bad as using IN()
Olaf
On 9/5/07 3:29 PM, "Baron Schwartz" <[EMAIL PROTECTED]> wrote:
> IN() subqueries in MySQL are badly optimized. It's usually better to
> use a JOIN, even though it'
Hi,
[EMAIL PROTECTED] wrote:
Hi list!
I've a problem with transaction
I initiate a transaction with "start transaction". Soon i execute
following query:
* update t1 set t=12; and by I complete I execute rollback but when I do
it I obtain the following thing:
"non-transactional Some changed tab
Hi list,
I am going to change the type of table to InnoDB
Thank!!
Pablo
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
The wait_timeout and interactive_timeout global variables are set to
172800, and max_allowed_packet is set to 30M, and I am still getting
the problem
> I am having debugging a problem I am seeing with mysqldump.
>
> While using mysqldump to make backups of my database, I will
> intermitently get t
On Wed, September 5, 2007 7:17, Jay Blanchard said:
> [snip]
> I have a Table and want to know the most visited products.
> Products
>
> - Id
>
> - Name
>
> - Visited
> [/snip]
>
> SELECT Id, Name, count(Visited) AS Total_Visits FROM product GROUP
> BY(Id)
order by Tota
select * from Products order by Visited desc limit 10; should give
you the top 10 products.
On 9/5/07, Tomas Abad <[EMAIL PROTECTED]> wrote:
>
> HI All,
>
>
>
> I have a Table and want to know the most visited products.
>
>
>
> Products
>
> - Id
>
> - Name
>
> -
Things to check:
* Packet bigger than my.cnf settings allow.
* Memory available to running process happened to be hit (FreeBSD has
"memdsiz").
* Network glitch.
> -Original Message-
> From: Ashok Chauhan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 04, 2007 12:37 AM
> To: mysql@l
Hi,
> two tables gi_t and gi
>
> gi_t holds 5 records. gi holds ca. 1500.
>
> I need all from gi for each in gi_t ie LEFT JOIN!!!
> but this:
> SELECT gi.id AS id, overskrift,gidata FROM gi_t LEFT JOIN gi ON
> gi_t.id=gi.gitref WHERE bladref=137
> gives the same as
> SELECT gi.id AS id, oversk
Hi,
> I've a problem with transaction
> I initiate a transaction with "start transaction". Soon i execute
> following query:
> * update t1 set t=12; and by I complete I execute rollback but when I do
> it I obtain the following thing:
> "non-transactional Some changed tables couldn't be rolled b
Which table is bladref in?
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.com
www.etudes-marche.com
> -Original Message-
> From: Kaj Schermer Didrikse
Hi list!
I've a problem with transaction
I initiate a transaction with "start transaction". Soon i execute
following query:
* update t1 set t=12; and by I complete I execute rollback but when I do
it I obtain the following thing:
"non-transactional Some changed tables couldn't be rolled back" an
Ya, I did that.
I read elsewhere that this was recommended for 4.1.9+.
I did
stop slave;
change master to master_log_file='{Relay_Master_Log_File}',
master_log_pos={Exec_master_log_pos};
start slave
And it gave the same error.
That is when I checked the binlogs and saw that it was corrupted at
{E
Thanks,
This seems to work but that IN seems to be really slow...
On 9/5/07 9:41 AM, "Justin" <[EMAIL PROTECTED]> wrote:
> try
>
> SELECT * from geno_260k WHERE ident IN (SELECT ident FROM geno_260k WHERE
> a1=0
> GROUP BY ident HAVING count(a1)>25);
>
> This will give you what you're d
reply inline
On 9/5/07, Olaf Stein <[EMAIL PROTECTED]> wrote:
>
> delete from geno_260k where ident=(select ident from geno_260k where a1=0
> group by ident having count(a1)>25);
When a sub query returns more than one row in a where clause, then "="
should be replaced by the "in" .
--
Th
stop slave;
change master to master_log_file='Relay_Master_Log_File' ,
master_log_pos=Exec_master_log_pos;
#Get the values for the above command from your show slave status output.
start slave;
The above process should fix your problem.
On 9/4/07, Russell E Glaue <[EMAIL PROTECTED]> wrote:
>
Hi
two tables gi_t and gi
gi_t holds 5 records. gi holds ca. 1500.
I need all from gi for each in gi_t ie LEFT JOIN!!!
but this:
SELECT gi.id AS id, overskrift,gidata FROM gi_t LEFT JOIN gi ON
gi_t.id=gi.gitref WHERE bladref=137
gives the same as
SELECT gi.id AS id, overskrift,gidata FROM gi_
[snip]
I have a Table and want to know the most visited products.
Products
- Id
- Name
- Visited
[/snip]
SELECT Id, Name, count(Visited) AS Total_Visits FROM product GROUP
BY(Id)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubs
> I have a Table and want to know the most visited products.
>
>
>
> Products
>
> - Id
>
> - Name
>
> - Visited
>
>
>
> Visited is numeric.
How about:
select * from Products order by Visited desc
?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQ
The checksum errors might be due to various reasons. We had similar issue
where we restored the database multiple times, replaced the ram sticks
nothing helped. Finally we drilled down the issue to the chassis. Recommend
testing the restore on a different machine to rule out any hardware issue.
--
HI All,
I have a Table and want to know the most visited products.
Products
- Id
- Name
- Visited
Visited is numeric.
Perhaps not the most elegant way:
- Create a temporary table
- Select-insert into the temp-table
- Use the temp-table for a delete-join or a 'NOT IN'-statement or something
like that
Hey all
I am stuck here (thinking wise) and need some ideas:
I
try
SELECT * from geno_260k WHERE ident IN (SELECT ident FROM geno_260k WHERE
a1=0
GROUP BY ident HAVING count(a1)>25);
This will give you what you're deleting first.. then if that is good. do
DELETE FROM geno_260k WHERE ident IN (SELECT ident FROM geno_260k WHERE
a1=0
GROUP BY ident
Hey all
I am stuck here (thinking wise) and need some ideas:
I have this table:
CREATE TABLE `geno_260k` (
`genotype_id` int(10) unsigned NOT NULL auto_increment,
`ident` int(10) unsigned NOT NULL,
`marker_id` int(10) unsigned NOT NULL,
`a1` tinyint(3) unsigned NOT NULL,
`a2` tinyint(3
Hi
This might be happening due to two reasons;
1 The system date might not be correct.
2. Some things wrong with log postion (Incorrect log position)
Regards,
Krishna Chandra Prajapati
On 8/31/07, Maurice Volaski <[EMAIL PROTECTED]> wrote:
>
> A 64-bit Gentoo Linux box had just been upgraded from
> I have a column where I need to replace all instances of the text "US-
> Complete" (contained within a long sentence) with "US Complete".
> There are probably 50 or 100 of them. I'm really scared to do it
> since I can't risk screwing up that column - what's the correct syntax?
When you s
On Tue, 4 Sep 2007, Shawn Green wrote:
> > On Tue, 4 Sep 2007, Lucio Chiappetti wrote:
> > For each I tested 3 cases (total 16*3=48) :
> >
> > a) the query on the "virtual" table correlated with the external
> > (the virtual is my G left join t1 ... left join tn). [...]
> > represents my REFERENC
Actually I fixed the problem by generating a whole new set of SSL
certificates!
Thanks for the help!
Regards,
Samy
[EMAIL PROTECTED] schrieb:
Hey,
This morning the default timespan of ssl certificates took my servers
down...
Everything was running fine, but this morning the SSL encrypted MyS
Marten Lehmann napsal(a):
Hello,
I have a table like this:
CREATE TABLE `places` (
`name` varchar(256) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
Then I want to insert two values:
pjöngjang.com and
pjongjang.com
29 matches
Mail list logo