Re: Temporary table creation fails

2012-09-10 Thread Shawn Green
On 9/10/2012 9:55 AM, Garot Conklin wrote: Not to beat the perms to death but /tmp should have the sticky bit set as well... so 1777 not just 0777. Perhaps hard kill any lingering mysql PIDS unless this is production and u expect other DB's to be running... if u have duplicated this DB schema

Re: Temporary table creation fails

2012-09-10 Thread Garot Conklin
Not to beat the perms to death but /tmp should have the sticky bit set as well... so 1777 not just 0777.  Perhaps hard kill any lingering mysql PIDS unless this is production and u expect other DB's to be running... if u have duplicated this DB schema somewhow by mistake and a second or first id

Re: Temporary table creation fails

2012-09-10 Thread Manuel Arostegui
2012/9/10 Machiel Richards - Gmail > Hi, > > permissions are confirmed as being correct. Other applications and > users are currently writing files to this directory yes. > Have you tried su - mysql and touch /tmp/test? (if your mysql user has shell...) Good luck! Manuel.

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
*From: * Machiel Richards - Gmail ; *To: * Ananda Kumar ; *Cc: * ; *Subject: * Re: Temporary table creation fails *Sent: * Mon, Sep 10, 2012 12:41:51 PM no selinux , checked this as well. We generally dont use selinux and disable it completely from installation. I have

Re: Temporary table creation fails

2012-09-10 Thread Garot Conklin
Apologies if I missed this in the thread but have you confirmed not only the effectve perms for the directory but that another user can write to this dirrectory? Perhaps outside of mysql for instance; I.e. other processes are successfully writting logs to /tmp? Anything to share from the mysql l

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
please share the command ur using to create the temp table On Mon, Sep 10, 2012 at 6:11 PM, Machiel Richards - Gmail < machiel.richa...@gmail.com> wrote: > no selinux , checked this as well. > > We generally dont use selinux and disable it completely from installation. > > I have also gone thro

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
no selinux , checked this as well. We generally dont use selinux and disable it completely from installation. I have also gone through the firewall settings and that is only rules for connections. On 09/10/2012 02:40 PM, Ananda Kumar wrote: did u check if there any firewall settings, forbi

Re: Temporary table creation fails

2012-09-10 Thread Akshay Suryavanshi
Hi, If you can afford try changing the tmpdir for mysql. This is a static variable and will require a mysql restart. thanks On Mon, Sep 10, 2012 at 6:08 PM, Machiel Richards - Gmail < machiel.richa...@gmail.com> wrote: > Hi > > > at the moment this does not really matter to us. > > we have

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
did u check if there any firewall settings, forbidding you to create files, check if " SELinux is disabled" On Mon, Sep 10, 2012 at 6:08 PM, Machiel Richards - Gmail < machiel.richa...@gmail.com> wrote: > Hi > > > at the moment this does not really matter to us. > > we have even tried to cr

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi at the moment this does not really matter to us. we have even tried to create a temp table with only one field in order to insert one row for testing, but we are currently not able to create any temporary tables whatsoever as even the simplest form of table still gives the same error.

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
this temp table will hold how many rows, what would be its size. On Mon, Sep 10, 2012 at 5:03 PM, Machiel Richards - Gmail < machiel.richa...@gmail.com> wrote: > Hi, > We confirmed that the /tmp directory permissions is set to rwxrwxrwxt > and is owned by root , the same as all our other serv

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi, We confirmed that the /tmp directory permissions is set to rwxrwxrwxt and is owned by root , the same as all our other servers. There is also about 60Gb of free space on the filesystem where /tmp resides. Regards On 09/10/2012 01:11 PM, Rik Wasmus wrote: the message "ERROR 1

Re: Temporary table creation fails

2012-09-10 Thread Rik Wasmus
> the message "ERROR 1005 (HY000): Can't create table > '/tmp/#sql4a27_68eed1_0.frm' (errno: -1)" Basics first: 1) Is the /tmp directory write & readable for the user mysql runs as? 2) Has the /tmp directory enough free space? -- Rik Wasmus -- MySQL General Mailing List For list archives: http:

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
We have a mysql 5.0 database which is giving us hassles when trying to create a temporary table. The creation works perfectly on the slave machine as

Re: Temporary table creation fails

2012-09-10 Thread Akshay Suryavanshi
error >>>> >>>> show innodb status\G >>>> >>>> On Mon, Sep 10, 2012 at 2:25 PM, Machiel Richards - Gmail >>>> >>> <mailto:machiel.richards@**gmail.com>> >>>> wrote: >>&

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
trying to create a temporary table. The creation works perfectly on the slave machine as well as all our other db's, however on the one specific main server we are getting the message "ERROR 1005 (HY000): Can't create

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
el Richards - Gmail < >> machiel.richa...@gmail.com> wrote: >> >>> Hi All >>> >>> I am hoping someone can point me in the right direction. >>> >>> We have a mysql 5.0 database which is giving us hassles when trying >

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Gmail mailto:machiel.richa...@gmail.com>> wrote: Hi All I am hoping someone can point me in the right direction. We have a mysql 5.0 database which is giving us hassles when trying to create a temporary table. The creation works perf

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
the right direction. >> >> We have a mysql 5.0 database which is giving us hassles when trying >> to create a temporary table. >> >> The creation works perfectly on the slave machine as well as all our >> other db's, however on the one specific mai

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
right direction. We have a mysql 5.0 database which is giving us hassles when trying to create a temporary table. The creation works perfectly on the slave machine as well as all our other db's, however on the one specific main server we are getting the message "E

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
a mysql 5.0 database which is giving us hassles when trying to > create a temporary table. > > The creation works perfectly on the slave machine as well as all our > other db's, however on the one specific main server we are getting the > message "ERROR 1005 (HY000): Ca

Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi All I am hoping someone can point me in the right direction. We have a mysql 5.0 database which is giving us hassles when trying to create a temporary table. The creation works perfectly on the slave machine as well as all our other db's, however on the one specific

Join between columns with unique keys randomly uses the keys, or uses a temporary table (which fails).

2009-12-11 Thread Matthew Blissett
KEY `DateLastModified` (`DateLastModified`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 There are 336983 rows in darwincoredata, and 337304 in newdarwincoredata. The plan for the query varies between using the CatalogNumber index and using a temporary table (which fails, once it fills up the disk). I

RE: load data into temporary table

2009-05-19 Thread Gavin Towey
temporary table Thank you but the real problem occurs when you don't know the schema of the table in advance. If data.txt has two columns columns how can I still load it in a temporary table? I'm asking this question because I'd like to add an import csv feature to a web application.

Re: load data into temporary table

2009-05-19 Thread Alex K
Thank you but the real problem occurs when you don't know the schema of the table in advance. If data.txt has two columns columns how can I still load it in a temporary table? I'm asking this question because I'd like to add an import csv feature to a web application. I know that yo

Re: load data into temporary table

2009-05-19 Thread Janek Bogucki
Hi, mysql> create temporary table t(i int); mysql> \! echo 1 > /tmp/data.txt mysql> load data infile '/tmp/data.txt' into table t; Query OK, 1 row affected (0.00 sec) Records: 1 Deleted: 0 Skipped: 0 Warnings: 0 mysql> select * from t; +--+ | i| +--+ |

load data into temporary table

2009-05-18 Thread Alex K
Hello, Would anyone know how to load data infile into a temporary table? Thank you, Alex -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Is Temporary table right approach

2009-04-19 Thread Moon's Father
gt; Andrew > > -Original Message- > From: Moon's Father [mailto:yueliangdao0...@gmail.com] > Sent: 17 April 2009 06:36 > To: Manoj Singh > Cc: php...@lists.php.net; mysql@lists.mysql.com > Subject: Re: Is Temporary table right approach > > If you can not eli

RE: Is Temporary table right approach

2009-04-17 Thread Andrew Braithwaite
d cause his site To die a miserable swappy death. Andrew -Original Message- From: Moon's Father [mailto:yueliangdao0...@gmail.com] Sent: 17 April 2009 06:36 To: Manoj Singh Cc: php...@lists.php.net; mysql@lists.mysql.com Subject: Re: Is Temporary table right approach If you can not eli

Temporary table vs. sub-select

2009-04-17 Thread Jerry Schwartz
= `t3`.`y`; Table `t3` won't have any indices, even if table `t2` does, is that correct? (Assume that the sub-select is really much more complicated that my example.) Wouldn't it be a lot faster to replace the sub-select with a temporary table that does have a key on `y`? Regards

Re: Is Temporary table right approach

2009-04-16 Thread Moon's Father
If you can not eliminate your temporary tables, you have to adjust the following parameters in my.cnf [mysqld] max_heap_table_size=1G tmp_table_size=1G On Fri, Apr 17, 2009 at 12:57 PM, Manoj Singh wrote: > Hi All, > > Thanks for your valuable input. > > I have decided to use

Re: Is Temporary table right approach

2009-04-16 Thread Manoj Singh
Hi All, Thanks for your valuable input. I have decided to use temporary table approach. Since I am using it for the first time and this has to be done in the production server. Do I need to consider some facts before using this such as setting some parameters in my.cnf etc or the MYSQL will

Re: Is Temporary table right approach

2009-04-16 Thread Moon's Father
Use temporary table can be a good idea. But I think you performance would be boost so much if you can do something else to replace the temporary table. On Wed, Apr 15, 2009 at 2:03 PM, Manoj Singh wrote: > Hi All, > > I have a query which returns the large number of ids which i am

Is Temporary table right approach

2009-04-14 Thread Manoj Singh
Hi All, I have a query which returns the large number of ids which i am using in other queries. I am doing this in PHP. Now the first query can return unlimited number of ids which might create problem in PHP. I want to store this ids in MYSQL through temporary table so that i can access that ids

Re: How to determine if temporary table exists

2008-11-21 Thread mos
eption in my program. I thought there should > be an easy way using SQL to determine if a temporary table exists or > not. Why not "CREATE TEMPORARY TABLE IF NOT EXISTS ..."? If you really need to know whether the table existed before or not, that command will return a warning if it

Re: How to determine if temporary table exists

2008-11-20 Thread Dan Nelson
should > be an easy way using SQL to determine if a temporary table exists or > not. Why not "CREATE TEMPORARY TABLE IF NOT EXISTS ..."? If you really need to know whether the table existed before or not, that command will return a warning if it was there already. htt

Re: How to determine if temporary table exists

2008-11-20 Thread mos
eate it. I suppose could count the rows in Tablex and it would throw an exception if the table did not exist . But I really didn't want to resort to trapping an exception in my program. I thought there should be an easy way using SQL to determine if a temporary table exists or not. Mike

Re: How to determine if temporary table exists

2008-11-20 Thread Moon's Father
Try drop table if exists Tablex; On Fri, Nov 21, 2008 at 9:53 AM, mos <[EMAIL PROTECTED]> wrote: > How can I determine if a temporary table exists? Normally I use something > like: > > create temporary table Tablex like Table1; > show tables like "Tablex"; > &g

How to determine if temporary table exists

2008-11-20 Thread mos
How can I determine if a temporary table exists? Normally I use something like: create temporary table Tablex like Table1; show tables like "Tablex"; but the Show Tables never displays any rows for a temporary table even though the temporary Tablex exists. (All in same thread). So

RE: DESCRIBE temporary table

2008-07-24 Thread Rolando Edwards
riginal Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2008 4:43 PM To: mysql@lists.mysql.com Subject: DESCRIBE temporary table I am not finding a quick reference to this, but I wanted to DESCIBE a TEMPORARY TABLE so that I can make sure the index was properly appli

DESCRIBE temporary table

2008-07-24 Thread Jay Blanchard
I am not finding a quick reference to this, but I wanted to DESCIBE a TEMPORARY TABLE so that I can make sure the index was properly applied. Can this not be done? TIA! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

LEFT JOIN without temporary table?

2008-05-08 Thread Jerry Schwartz
I want to get a list of all products that either exist or do not exist. In other words, if prod.prod_pub_prod_id exists then I want to report its prod_num; if it doesn't, then I want to report the product ID with a blank value for the prod_num. I'm currently using a temporary table to do

Re: Deleting duplicate rows via temporary table either hung or taking way way too long [SOLVED]

2008-02-05 Thread Chris W
Daevid Vincent wrote: WOW! You are right! That's silly. It's a table with a single column. All unique. With out the index MySQL doesn't know they are unique. Anyways, here's the magic incantation that worked for me: DROP TABLE IF EXISTS `dupes`; CREATE TEMPORARY TABLE

RE: Deleting duplicate rows via temporary table either hung or taking way way too long [SOLVED]

2008-02-05 Thread Daevid Vincent
> -Original Message- > From: Chris W [mailto:[EMAIL PROTECTED] > Sent: Monday, February 04, 2008 9:05 PM > To: Daevid Vincent; MYSQL General List > Subject: Re: Deleting duplicate rows via temporary table > either hung or taking way way too long > > &

Re: Deleting duplicate rows via temporary table either hung or taking way way too long

2008-02-04 Thread Chris W
Daevid Vincent wrote: DROP TABLE IF EXISTS `dupes`; CREATE TEMPORARY TABLE dupes SELECT LogID FROM buglog GROUP BY BID, TS HAVING count(*) > 1 ORDER BY BID; LOCK TABLES buglog WRITE; SELECT * FROM buglog WHERE LogID IN (SELECT LogID FROM dupes) LIMIT 10; #DELETE FROM buglog WHERE LogID

Deleting duplicate rows via temporary table either hung or taking way way too long

2008-02-04 Thread Daevid Vincent
date buglog set BID = 0 where LogID #// IN (select LogID from buglog group by BID, TS having count(*) > 1 order by BID); #// delete from buglog where BID = 0; So then I tried this hack-method: DROP TABLE IF EXISTS `dupes`; CREATE TEMPORARY TABLE dupes SELECT LogID FROM buglog GROUP

Re: remove temporary table from SELECT query

2007-08-10 Thread Ananda Kumar
Hi , "ORDER BY", will always use some temporary table for doing sort operation. For that matter, any group function, like min,max,group by,order by will use temporary table before displaying the final results. Regards anandkl On 8/10/07, Mike Zupan <[EMAIL PROTECTED]> wrote

Re: remove temporary table from SELECT query

2007-08-10 Thread Mike Zupan
gt; > > connect_timeout = 10 > > > tmp_table_size = 32M > > > max_heap_table_size = 64M > > > max_allowed_packet = 64M > > > max_connect_errors = 1000 > > > read_rnd_buffer_size = 512M > > > bulk_insert_buffer_size = 8M > > > query_c

Re: remove temporary table from SELECT query

2007-08-10 Thread Ananda Kumar
= 64M > > max_allowed_packet = 64M > > max_connect_errors = 1000 > > read_rnd_buffer_size = 512M > > bulk_insert_buffer_size = 8M > > query_cache_limit = 38M > > query_cache_size = 256M > > query_cache_type = 1 > > query_prealloc_size = 65536 >

Re: remove temporary table from SELECT query

2007-08-10 Thread Ananda Kumar
engine = MyISAM > > > On 8/9/07, Andrew Armstrong <[EMAIL PROTECTED]> wrote: > > > > It goes to a temporary table when MySQL does not have enough memory > > (allocated) to store the temporary results in memory, so it needs to > > create > > a temporar

Re: remove temporary table from SELECT query

2007-08-10 Thread Mike Zupan
_size = 131072 default-storage-engine = MyISAM On 8/9/07, Andrew Armstrong <[EMAIL PROTECTED]> wrote: > > It goes to a temporary table when MySQL does not have enough memory > (allocated) to store the temporary results in memory, so it needs to > create > a temporary table on di

RE: remove temporary table from SELECT query

2007-08-09 Thread Andrew Armstrong
It goes to a temporary table when MySQL does not have enough memory (allocated) to store the temporary results in memory, so it needs to create a temporary table on disk. Try increasing the memory buffer size or eliminating more rows from the query. -Original Message- From: Mike Zupan

remove temporary table from SELECT query

2007-08-09 Thread Mike Zupan
I have been pulling my hair out over a temporary table being created in the following query SELECT SQL_NO_CACHE SQL_CALC_FOUND_ROWS entryid,title FROM friends_test INNER JOIN entries ON friendLink=userid AND userLink=2 order by entryid if I change userLink=2 to friendLink=2 it is fine and its

Re: Temporary table lifespan - SOLVED

2007-02-17 Thread Amer Neely
Jerry Schwartz wrote: Possibly you are opening another connection, using the same handle, when you re-enter your script. If that is the case, you'll lose track of your previous connection (the one that has the temporary table). You might also be accumulating a lot of connections, if

RE: Temporary table lifespan - SOLVED

2007-02-16 Thread Jerry Schwartz
Possibly you are opening another connection, using the same handle, when you re-enter your script. If that is the case, you'll lose track of your previous connection (the one that has the temporary table). You might also be accumulating a lot of connections, if this recursion happens mul

Re: Temporary table lifespan - SOLVED

2007-02-15 Thread Amer Neely
creating a unique table name - you can just use a generic one ( eg tmp_purchase_order or something ). I'll try something like that tomorrow. Thanks for the responses. I'll post my results. After failing to get the temporary table method working, I ended up just creating a tab

Re: Temporary table lifespan

2007-02-15 Thread Amer Neely
Daniel Kasak wrote: Amer Neely wrote: OK, that makes sense. As far as I know, my connection is still live - I don't do a disconnect anywhere. So I'm still not sure why I can't pull the data back out. I do get an error telling me about a problem with my statement near which is where it tr

Re: Temporary table lifespan

2007-02-15 Thread Daniel Kasak
Amer Neely wrote: OK, that makes sense. As far as I know, my connection is still live - I don't do a disconnect anywhere. So I'm still not sure why I can't pull the data back out. I do get an error telling me about a problem with my statement near which is where it tries to execute the F

Re: Temporary table lifespan

2007-02-15 Thread Amer Neely
Amer Neely wrote: Daniel Kasak wrote: Amer Neely wrote: I'm writing a perl script in which I need to save some session data. My first attempt is to use a temporary table to store some data. However, I'm a little unclear as to the lifespan of the temporary table. My understandi

Re: Temporary table lifespan

2007-02-15 Thread Daniel Kasak
Amer Neely wrote: I'm writing a perl script in which I need to save some session data. My first attempt is to use a temporary table to store some data. However, I'm a little unclear as to the lifespan of the temporary table. My understanding is they last until the session ends, or

Temporary table lifespan

2007-02-15 Thread Amer Neely
I'm writing a perl script in which I need to save some session data. My first attempt is to use a temporary table to store some data. However, I'm a little unclear as to the lifespan of the temporary table. My understanding is they last until the session ends, or a DELETE TABLE is

Re: How to build a single temporary table from 3 tables on the fly

2006-10-11 Thread Philip Mather
Kerry, It gives me a solution and some reading. No probs, here's some actual code that I hacked together on a 4.1-sommat-or-other database, an important thing to note is to be careful of any Unique keys selected from the three individual tables as they may no longer be unique of course once

RE: How to build a single temporary table from 3 tables on the fly

2006-10-11 Thread Kerry Frater
Thanks Phil It gives me a solution and some reading. Kerry -Original Message- From: Philip Mather [mailto:[EMAIL PROTECTED] Sent: 11 October 2006 10:02 To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: How to build a single temporary table from 3 tables on the fly

How to build a single temporary table from 3 tables on the fly

2006-10-11 Thread Kerry Frater
Can someone help point me in the right direction for this. This isn’t exactly what I want but once I have the solution to this I can work out the permutations I need. How do I select from 3 tables into a single table (consequtive rows not joined ones) and include a two new columns which is the nam

RE: Temporary table ERROR 1109 (42S02) where are temporary tables kept?

2006-07-05 Thread Jacob, Raymond A Jr
Thanks again, raymond -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 14:54 To: Jacob, Raymond A Jr Cc: mysql@lists.mysql.com Subject: Re: Temporary table ERROR 1109 (42S02) where are temporary tables kept? Jacob, Raymond A Jr wrote

Re: Temporary table ERROR 1109 (42S02) where are temporary tables kept?

2006-07-05 Thread Michael Stassen
Jacob, Raymond A Jr wrote: Thank you, I was definitely on the wrong track on this one. I annotated your commands to make sure that I understood what they were doing. Are my comments correct? --- You have the wrong syntax. You can't mention a table in the WHERE clause that wasn't in t

RE: Temporary table ERROR 1109 (42S02) where are temporary tables kept?

2006-07-05 Thread Jacob, Raymond A Jr
Thank you, I was definitely on the wrong track on this one. I annotated your commands to make sure that I understood what they were doing. Are my comments correct? --- You have the wrong syntax. You can't mention a table in the WHERE clause that wasn't in the FROM clause. Try DELE

Re: Temporary table ERROR 1109 (42S02) where are temporary tables kept?

2006-07-05 Thread Michael Stassen
Jacob, Raymond A Jr wrote: I ran the following commands: USE snort; CREATE TEMPORARY TABLE sidtemp SELECT cid FROM event WHERE timestamp < '2006-05-01'; ... SELECT count(*) from sidtemp; count(*) 7501376 DELETE FROM data WHERE data.cid = sidtemp.cid; ERROR 1109 (42S02):

Temporary table ERROR 1109 (42S02) where are temporary tables kept?

2006-07-05 Thread Jacob, Raymond A Jr
I ran the following commands: USE snort; CREATE TEMPORARY TABLE sidtemp SELECT cid FROM event WHERE timestamp < '2006-05-01'; ... SELECT count(*) from sidtemp; count(*) 7501376 DELETE FROM data WHERE data.cid = sidtemp.cid; ERROR 1109 (42S02): Unkown table 'sidtemp'

DROP TEMPORARY TABLE waiting for table???

2006-06-30 Thread Nick Arnett
cedures locking all the tables they're going to use, which was preventing concurrency. The problem is that despite this, I'm seeing processes that are stuck with status "Waiting for table" when they are trying to drop the temporary table if it exists ("DROP TEMPORARY TABLE IF

Re: temporary table issue

2006-01-10 Thread Jigal van Hemert
Ben Clewett wrote: But the index does not seem nearly as fast as liner (normal) indexes. Hence using a less effective liner index may be better... After this method I still need select a radius within these data points, more effort. This could be an excellent case for using HAVING The WHER

Re: temporary table issue

2006-01-10 Thread Ben Clewett
rary tabel temp_a if exists 'temp_a'; it said syntax error. Try: DROP TEMPORARY TABLE IF EXISTS `temp_a`; ('table' instead of 'tabel'; table name only once; backticks around table name instead of quotes) http://dev.mysql.com/doc/refman/5.0/en/drop-table.html R

Re: temporary table issue

2006-01-10 Thread Xiaobo Chen
Hi, Jigal Thanks a lot. It works. > Xiaobo Chen wrote: >> Hi, all >> >> I am trying to use this with error: >> >> drop temporary tabel temp_a if exists 'temp_a'; >> >> it said syntax error. > > Try: > > DROP TEMPORARY TABLE I

Re: temporary table issue

2006-01-10 Thread Bill Dodson
DROP TEMPORARY TABLE IF EXISTS `temp_a`; Xiaobo Chen wrote: Hi, all I am trying to use this with error: drop temporary tabel temp_a if exists 'temp_a'; it said syntax error. Could anybody tell me the right syntax? I didn't find the answer after googling a while. Th

Re: temporary table issue

2006-01-10 Thread Jigal van Hemert
Xiaobo Chen wrote: Hi, all I am trying to use this with error: drop temporary tabel temp_a if exists 'temp_a'; it said syntax error. Try: DROP TEMPORARY TABLE IF EXISTS `temp_a`; ('table' instead of 'tabel'; table name only once; backticks around table

temporary table issue

2006-01-10 Thread Xiaobo Chen
Hi, all I am trying to use this with error: drop temporary tabel temp_a if exists 'temp_a'; it said syntax error. Could anybody tell me the right syntax? I didn't find the answer after googling a while. Thanks in advance. Xiaobo -- Faculty of Computer Science Dalhousie University Halifax, No

sun.jdbc.rowset.CachedRowSet and Temporary Table.

2005-11-01 Thread Frondoni, Giorgio
Because the SHOW FULL COLUMNS FROM command does not apply to temporary table, a java program using Connector/J is not able to use the sun.jdbc.rowset.CachedRowSet to retrieve the data from a temporary table. Does anyboby have any suggestions? Thank you. Here is the version of mysql server

CREATE TEMPORARY TABLE error

2005-10-25 Thread あいさかりな
; on query 'CREATE TEMPORARY TABLE book_continue_target_data SELECT t1.***, t2.id AS ***, t2.* , t2.*** AS last_day FROM *** AS t1, *** AS t2, service AS t3 WHERE (DATE_FORMAT(t2.***, "%Y-%m-%d") BETWEEN '2004-10-21' AND '2004-10-25') AND t1.id=t2.*** AND t2.service_i

read-only and CREATE TEMPORARY TABLE (was: safe way of replication?)

2005-03-09 Thread Eamon Daly
Speaking of the --read-only option, I don't suppose there's any way to run --read-only but allow CREATE TEMPORARY TABLE, is there? We run several reports against a slave server which require temporary tables for speed, and have had a problem with the occasional accidental write to the

RE: create indexes for temporary table

2005-01-23 Thread Clint Edwards
Sam, Remove the double quotes and semi-colon out of this statement: $tmp_sql = qq{alter table tmp_pastsales add index(salescode,basename,prodcode)}; Clint From: sam wun <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Subject: create indexes for temporary table Date: Sun, 23 Jan 2005 18:49:51

RE: show temporary table

2005-01-23 Thread Clint Edwards
Sam, You can use 'show tables' with a like clause if you prefix your temporary tables with a string such as 'tmp_'. See the manual for syntax: http://dev.mysql.com/doc/mysql/en/show-tables.html Clint From: sam wun <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Subject:

create indexes for temporary table

2005-01-23 Thread sam wun
Hi, I want to create indexes for temporary created tables in perl dbi. The following is perl code that I tried, but perl dbi seems not allow the syntax: Unable to execute our query PastSales:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for

show temporary table

2005-01-22 Thread sam wun
Hi, How can I see all temporary tables that created by Create Temporary Table command in mysql 5.01? thanks Sam -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Indicating an INDEX during TEMPORARY table creation

2004-08-11 Thread Victor Pendleton
You will need to know the name of the column(s) you will be indexing in order to do this. create temporary table some_table (index idx_name(col1) SELECT * from source_table -Original Message- From: David Perron To: [EMAIL PROTECTED] Sent: 8/11/04 11:36 AM Subject: Indicating an INDEX

Indicating an INDEX during TEMPORARY table creation

2004-08-11 Thread David Perron
When executing: CREATE TEMPORARY TABLE temp_1 AS SELECT * FROM table_name Is it possible to indicate an index within the syntax of this statement - as opposed to issuing an ALTER TABLE command after the table is created? Thanks in advance for any help. -- MySQL General Mailing List For

Re: Self joins with a temporary table

2004-07-30 Thread Gustav Munkby
ds, Gustav Munkby Sinisa Milivojevic writes: > Benjamin Stapley writes: > > > > I don't seem to be able to perform a self-join with a temporary > > table. > > Is the any good reason why this should not work? > > > > CREATE TEMPORARY table

Re: Create Temporary Table, incorrect rows

2004-07-06 Thread Duncan Hill
On Tuesday 06 July 2004 17:20, Paul McNeil wrote: > Yes I am using mysqlcc. Is that why the 1000 row limit? Yes. It's under the server options tag (don't have it in front of me to give exact details). If you right click the server connection, under I think properties, there's a query limit.

RE: Create Temporary Table, incorrect rows

2004-07-06 Thread Paul McNeil
11:05 AM To: [EMAIL PROTECTED] Subject: Re: Create Temporary Table, incorrect rows On Tuesday 06 July 2004 15:30, Paul McNeil might have typed: > > When I run this it says that the temp table has only 1000 rows. Why? Are you using mysqlcc? -- MySQL General Mailing List For list archives

Re: Create Temporary Table, incorrect rows

2004-07-06 Thread Brian Reichert
nct(myData) from myTable -> 1411000 I presume there's a typo here: count(*) should have returned a larger number than distinct(myData), not smaller. > So I created a temporary table to store distinct records and want to do a > join with original table to see what records are duplicates. &g

RE: Create Temporary Table, incorrect rows

2004-07-06 Thread Paul McNeil
, 2004 11:11 AM To: Paul McNeil; MySQL General Subject: Re: Create Temporary Table, incorrect rows A more direct way to find dupes ... SELECT id, COUNT( id ) AS cnt, FROM myTable GROUP BY id HAVING cnt > 1 PB - Original Message - From: Paul McNeil To: My

Re: Create Temporary Table, incorrect rows

2004-07-06 Thread Peter Brawley
A more direct way to find dupes ... SELECT id, COUNT( id ) AS cnt, FROM myTable GROUP BY id HAVING cnt > 1 PB - Original Message - From: Paul McNeil To: MySQL General Sent: Tuesday, July 06, 2004 9:30 AM Subject: Create Temporary Table, incorrect rows Good day to

Re: Create Temporary Table, incorrect rows

2004-07-06 Thread Duncan Hill
On Tuesday 06 July 2004 15:30, Paul McNeil might have typed: > > When I run this it says that the temp table has only 1000 rows. Why? Are you using mysqlcc? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Temporary Table update

2004-07-06 Thread Paul McNeil
I added a LIMIT clause to my create table command and now all data is present. Is the 1000 row limit a standard that must always be overridden? God Bless Paul C. McNeil Developer in Java, MS-SQL, MySQL, and web technologies. GOD BLESS AMERICA! To God Be The Glory! -- MySQL Ge

Create Temporary Table, incorrect rows

2004-07-06 Thread Paul McNeil
Good day to all. I have a table and want to find duplicate info in the table. I know duplicated info exists by running the following... Select count(*) from myTable -> 141123 Select distinct(myData) from myTable -> 1411000 So I created a temporary table to store distinct records and want

Re: select query that uses a temporary table

2004-07-06 Thread Egor Egorov
"Lorderon" <[EMAIL PROTECTED]> wrote: > Mabye, is there a way to tell MySQL to limit the temporary table up to 500 > rows? so, when a row is matching into the top 500 rows, the last row will be > dropped out (in case the table is on limit), and the new matched row wi

select query that uses a temporary table

2004-07-01 Thread Lorderon
Hi All, There's something that bothers me.. I have a query that uses a temporary table (has a necessary GROUP BY clause). The query also uses ORDER BY clause (necessary too). And I also use LIMIT clause. If the query finds 10,000 rows, then MySQL will insert 10,000 rows into the temporary

RE: DROP TEMPORARY TABLE and implicit commits

2004-06-18 Thread Michael McTernan
004 13:00 > To: Mysql > Subject: Re: DROP TEMPORARY TABLE and implicit commits > > > Michael, > > - Alkuperäinen viesti - > Lähettäjä: "Michael McTernan" <[EMAIL PROTECTED]> > Vastaanottaja: "Mysql" <[EMAIL PROTECTED]> > Kopio:

Re: DROP TEMPORARY TABLE and implicit commits

2004-06-15 Thread Heikki Tuuri
Michael, - Alkuperäinen viesti - Lähettäjä: "Michael McTernan" <[EMAIL PROTECTED]> Vastaanottaja: "Mysql" <[EMAIL PROTECTED]> Kopio: <[EMAIL PROTECTED]> Lähetetty: Monday, June 14, 2004 9:40 PM Aihe: DROP TEMPORARY TABLE and implicit commits >

DROP TEMPORARY TABLE and implicit commits

2004-06-14 Thread Michael McTernan
Hi there, I'm using MySQL 4.0.18 and finding that DROP TEMPORARY TABLE is performing an implicit commit, as is documented. The problem is that I have a complex query in a Java function, and I need to call it a number of times to get the overall, which I also want to do as a single transacti

Re: [SOLVED?] Access Denied for CREATE TEMPORARY TABLE

2004-06-12 Thread Robert Paulsen
On Friday 11 June 2004 06:59 pm, Robert Paulsen wrote: > I must be missing something about "create temporary table". Here are two > sql commands. The first works the second fails: > > CREATE TABLE mytable (id int(10) NOT NULL auto_increment, data > varc

  1   2   >