create alias for columns bound to database?

2012-05-18 Thread D. Dante Lorenso
eaking existing code. I would then be able to refactor at a more leisurely pace. Does the feature exist, or can it be created? -- Dante D. Dante Lorenso da...@lorenso.com 972-333-4139 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Trying to avoid bulk insert table locking

2010-02-06 Thread D. Dante Lorenso
logic like this already? Care to share your results and findings? Would this approach work, and is it fairly simple to do? -- Dante -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread D. Dante Lorenso
lock issue. Are you saying I should just ignore the message about deadlock and let the app run as if the message never occurred (since there's not a problem with seeing that message)? -- Dante - michael dykman On Mon, Feb 1, 2010 at 9:33 AM, Dante Lorenso wrote: All, I am trying to cr

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread D. Dante Lorenso
ELECT FOR UPDATE followed by the INSERT/UPDATE, would that help fix the errors? What is this error exactly, anyhow? Where is the deadlock ... is it on the select or the insert? -- Dante On Mon, Feb 1, 2010 at 4:08 PM, Michael Dykman <mailto:mdyk...@gmail.com>> wrote: The

Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread Dante Lorenso
on failure: 1213 Deadlock found when trying to get lock; try restarting transaction Am I writing my query wrong or expecting behavior that MySQL doesn't support? -- Dante

Re: Is anything ever equal to NULL?

2009-12-28 Thread D. Dante Lorenso
bout 15 seconds to run against 40 million records, but if I run the second query, it takes about .050 seconds. The test for NULL seems to cause the query to skip use of an index because I doubt NULL values are indexed. Am I expecting too much of the parser? -- Dante Martijn Tonies wrote: Hi,

Is anything ever equal to NULL?

2009-12-28 Thread D. Dante Lorenso
'abc'; And therefor use the index I have on 'somecolumn'? When I manually rewrite the query, I get the performance I expect but when I leave it as it was, it's 100 times slower. What's so special about NULL? -- Dante -- D. Dante Lorenso -- MySQL Genera

UPDATE and simultaneous SELECT ... similar to RETURNING?

2009-12-22 Thread Dante Lorenso
All, There was a feature of another DB that I have grown extremely accustomed to and would like to find the equivalent in MySQL: UPDATE mytable SET mycolumn = mycolumn + 1 WHERE mykey = 'dante' RETURNING mycolumn; The magic of this statement is in the "RETURNING" claus

How to not lock anything?

2009-12-14 Thread D. Dante Lorenso
ers? Is there a MySQL Storage Engine designed for this kind of usage, or is there a another server that is commonly used along with MySQL for this type of thing? -- Dante -- D. Dante Lorenso da...@larkspark.com 972-333-4139 -- -- D. Dante Lorenso da...@lorenso.com 972-333-4139

temporary merge table as table name alias

2009-12-11 Thread Dante Lorenso
All, Is is possible to create temporary MERGE tables? This code gives an error: 8< 8< -- clean slate DROP TABLE IF EXISTS test_abcdefgh; DROP TABLE IF EXISTS dante; -- create demo table CREATE

Re: stored procedure and random table name -> temp table, merge, prepared statement

2009-12-10 Thread D. Dante Lorenso
ve to review what I was working on at the office and figure out why that wasn't working for me. It might be a mysql version difference, but I'm guessing it was something to do with the original table being too complex for the Merge table to work. Maybe indexes not matching? An

stored procedure and random table name -> temp table, merge, prepared statement

2009-12-10 Thread Dante Lorenso
lias. -- remove our temporary table if it already exists DROP TABLE IF EXISTS dante; -- -- clone the table structure CREATE TEMPORARY TABLE dante LIKE name_of_table_here; -- -- change the temporary table to a merge table which references the named table ALTER TABLE dante ENGINE=MERGE UNION(name_o

Re: which solution is better for $count and @cols

2008-10-23 Thread D. Dante Lorenso
; $start) { $start = 1; } 2, SELECT col FROM table WHERE $where LIMIT $start, $rows. Option B is horrible for large result sets. Only drawback to A is the tediousness of having 2 queries, but you get over that once you develop a pattern for writing them that way. -- Dante -- D. Dante

Re: Does MySQL have RETURNING in the language?

2008-10-15 Thread D. Dante Lorenso
D. Dante Lorenso wrote: There's an awesome feature that was added to PostgreSQL a while back called RETURNING that allows you to make an INSERT, UPDATE, and DELETE statement behave like a SELECT statement. ... Does RETURNING exist in any current release of MySQL or is it on the TODO list

Re: Does MySQL have RETURNING in the language?

2008-10-15 Thread D. Dante Lorenso
Rob Wultsch wrote: On Wed, Oct 15, 2008 at 12:25 PM, D. Dante Lorenso <[EMAIL PROTECTED]> wrote: There's an awesome feature that was added to PostgreSQL a while back called RETURNING that allows you to make an INSERT, UPDATE, and DELETE statement behave like a SELECT statement.

Does MySQL have RETURNING in the language?

2008-10-15 Thread D. Dante Lorenso
G exist in any current release of MySQL or is it on the TODO list even? If it's not, how can I go about asking to have it put on there? -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

How to build sub-sequence ... AUTO_INCREMENT on a sub-key starting with a specific offset?

2008-10-15 Thread D. Dante Lorenso
d a trigger that does something like this: SELECT COALESCE(MAX(widget_number) + 1, 1000) INTO NEW.widget_number FROM widget WHERE account_id = NEW.account_id; I don't think the 'MAX' is optimized, though and maybe there is a better, more robust way to do this which is al

Re: Why different engines in one database?

2008-10-11 Thread D. Dante Lorenso
abase load is lowest. -- Dante hezjing wrote: Hi When and why we create tables in different storage engines within a same database? Take for example a normal inventory application that provides CRUD operation to - USER table (e.g. create new user) - STOCK table (e.g. when there is new stock

Current state of CONNECT BY support in MySQL?

2008-10-08 Thread D. Dante Lorenso
MySQL now ... or will it later ... support CONNECT BY syntax? Help would be appreciated. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Any easier way to compare mysql schema of 50 databases?!

2008-10-06 Thread D. Dante Lorenso
rsion of this tool for many years and just recently started using their MySQL one. -- Dante -- D. Dante Lorenso [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

weird select - version 2

2008-02-27 Thread dante
Hi, Dont know if my last post got to the list, but since then my problem got a bit more complicated. I know how to solve it using two or more queries, but was wondering if it would be possible using only one: tableA id_tA numof descr 1 0809 john 2 0808 peter table_out id_tOut

HELP: Can not append access table with some duplicate records to mysql ver 4.

2001-12-20 Thread Dante Alzamora
Does someone know how to append records ignoring records that do not meet the database restrictions (UNIQUE index field). I can do it at the server with the IGNORE clause but that clause that not exist in access. TIA, Dante

How to ignore duplicate records appending from MS-ACCESS.

2001-12-18 Thread Dante Alzamora
Is there a way to formulate the SQL from MS_ACCESS to allow me to ignore duplicate records & insert the others? Or is there a switch on mysqld or myodbc that will allow me to do it? Thanks in Advanced, Dante - Before posting,