Re: MySQL Descending ORDER issue

2013-12-27 Thread Dan Nelson
the same session if it wants to. If you need a stable sort every time, you'll need to add another column to your ORDER BY clause. `id` might be a good choice (since it's your primary key for that table), or credential_id (since you're using that in your WHERE clause already). -- Dan Nelson

Re: how to create unique key for long varchar?

2013-11-05 Thread Dan Nelson
url with the one you want to insert. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Re: Animation studio asset management

2012-12-23 Thread Dan Nelson
queries that cover all shows if you want to generate summary reports. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Re: UDF behaves non-deterministic

2012-11-04 Thread Dan Nelson
/doc/refman/5.5/en/adding-udf.html As for debugging, you should be able to write things to stderr which will show up in the mysql logfile, or you could open your own logfile and write to that. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives

Re: Group expansion as part of the result

2012-03-27 Thread Dan Nelson
2,3,1,20,9 19 john 20,9 75 mark 1,20,9 You want GROUP_CONCAT: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_group-concat -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: case insensitivity

2012-01-16 Thread Dan Nelson
),from,to), though, at the expense of having your result string lowercased on you. If you need to preserve case, try the stored function at http://forge.mysql.com/tools/tool.php?id=135 . -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http

Re: libmysqlclient from source

2011-11-03 Thread Dan Nelson
-DWITHOUT_SERVER=1 ; it's not documented, but matches the autoconf --without-server flag, which was documented. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub

Re: setting max_allowed_packet dynamically problem

2011-11-03 Thread Dan Nelson
the server restarts, it will fall back to whatever you have set in my.cnf, or the default value if you don't have anything in my.cnf. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: How to enable tabular output when reading command from file?

2011-10-16 Thread Dan Nelson
Display output in table format. This is the default for interactive use, but can be used to produce table output in batch mode. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: User defined Variables

2011-10-16 Thread Dan Nelson
In the last episode (Oct 16), Kailash R said: Nice input Dan. Let me run some checks. My query is as follows: select group_concat(Field1), field2, field3 from table1 group by field2, field3 into str; @sql = concat(select blah ... where field1 in ' ,str); prepare stmt from @sql; execute

Re: User defined Variables

2011-10-15 Thread Dan Nelson
long strings with no problems, at least: mysql set @a=repeat('a',1024*1024*10); Query OK, 0 rows affected (0.95 sec) mysql select length(@a); ++ | length(@a) | ++ | 10485760 | ++ 1 row in set (0.05 sec) mysql -- Dan Nelson dnel

Re: mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES

2011-09-23 Thread Dan Nelson
some tables to open others. http://dev.mysql.com/doc/refman/5.5/en/not-enough-file-handles.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch

Re: a lesson in query writing and (maybe) a bug report

2011-08-26 Thread Dan Nelson
to scan a 3.5 million entry table instead of a 20,000 entry table. Can you post the EXPLAIN EXTENDED output for your before and after queries? also, have you recently run an ANALYZE TABLE on the tables? -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list

Re: Extraneous warning 1292 (Incorrect datetime value)

2011-08-07 Thread Dan Nelson
first, then the format string. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: MySQL RAND() Issues [was Re: How to Shuffle data]

2011-07-15 Thread Dan Nelson
()) | +--+ | 6faefaf3f7bb9ba0d1e7a44cf6a9b1da | | 740135ab69a1825630aeaf475b39f8b8 | | 5c91a9132ad3e49e098e41d573de8e00 | +--+ -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Optimizing column widths

2011-06-18 Thread Dan Nelson
is simply the maximum allowed size. http://dev.mysql.com/doc/refman/5.5/en/char.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Interesting bug/oversight

2011-05-19 Thread Dan Nelson
. If not, you'll need to bounce mysql. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: operation with dates

2011-05-13 Thread Dan Nelson
In the last episode (May 12), Halßsz Sßndor said: 2011/05/12 13:06 -0500, Dan Nelson In the last episode (May 12), Rocio Gomez Escribano said: I found it, mysql select userID from user where datediff(now(), userPaymentDate) 365; This can be made more readable by using mysql's

Re: operation with dates

2011-05-12 Thread Dan Nelson
, so if you have an index on that column mysql can use it: select userID from user where userPaymentDate (now() - interval 1 year) -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Parse text field from query

2011-03-31 Thread Dan Nelson
]]/NETWORK_ID/NICRANK![CDATA[- RUNNING_VMS]]/RANKREQUIREMENTS![CDATA[CLUSTER = kvm]]/REQUIREMENTSVCPU![CDATA[1]]/VCPUVMID![CDATA[713]]/VMID/TEMPLATE | -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: phantom database

2011-03-28 Thread Dan Nelson
by an optional semicolon terminator, but the short form should not. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: mysql vs source

2011-03-10 Thread Dan Nelson
between your two mysql commandlines it won't be noticed. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Group by question

2011-01-20 Thread dan
On 2011-1-16 20:22, Jørn Dahl-Stamnes wrote: Hello, I got a table that store information about which photo-albums that a client is viewing. I want to get the N last visited albums and use the query: mysql select album_id, updated_at, created_at from album_stats order by updated_at desc limit

Re: mySQLdump has a lot of variation for time to complete

2011-01-12 Thread Dan Nelson
time to run, run some show processlist commands and see if there are any INSERT or UPDATEs running. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch

Re: Problem with WHERE .. IN

2010-12-20 Thread Dan Nelson
| 5 | | 10 | 7 | | 10 | 11 | +--+-+ , then your original query would work the way you expected. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: Query precision issue

2010-10-25 Thread Dan Nelson
| +-+-+ 1 row in set (0.00 sec) -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Ineffective OPTIMIZE TABLES

2010-10-03 Thread Dan Nelson
switched the default to innodb_file_per_table=on, but if you are running any older version, you will need to set that value in your config file. http://dev.mysql.com/doc/refman/5.1/en/multiple-tablespaces.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List

Re: Migrating my mindset from MyISAM to InnoDB

2010-09-29 Thread Dan Nelson
the penalty you pay for supporting transactions and concurrent read/write access, and for switching to an index-organized table. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: INSERT DELAYED and created_on timestamps

2010-09-29 Thread Dan Nelson
try it on InnoDB. MySQL 5.5 is supposed to have a lot of concurrency improvements in; can you test your application on that and see if it's any faster than 5.0? -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: Too Strange for Words

2010-09-19 Thread Dan Nelson
| ++ 4 rows in set (0.00 sec) TIA, Victor -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Fast Index Creation and fill factor

2010-08-31 Thread Dan Nelson
. http://dev.mysql.com/doc/refman/5.1/en/innodb-physical-structure.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: How many pager command within mysql command line client?

2010-08-25 Thread Dan Nelson
in set (0.00 sec) mysql -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Performing subtraction between fields

2010-08-21 Thread Dan Nelson
situation You could use a trigger that updates C whenever A or B changes, to make sure it stays in synch. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch

Re: IS NULL returns Empty set, but I have empty items

2010-07-29 Thread Dan Nelson
sec) what goes with this, how can i ensure that this is NULL? Your url may be the empty string . If it was really NULL, you would see NULL in the resultset. Try SELECT * FROM product WHERE url= -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list

Re: idle query

2010-07-27 Thread Dan Nelson
(32GB for example), running LOAD INDEX INTO CACHE for your index, then running show status like 'key_blocks_used'; . http://dev.mysql.com/doc/refman/5.1/en/load-index.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http

Re: idle query

2010-07-27 Thread Dan Nelson
for the filesystem as a whole. In `vmstat` output, I thought bi is in terms of fixed-size blocks, not I/O commands. It looks like on Linux, bi and bo are the total disk throughput in kbytes. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http

Re: idle query

2010-07-27 Thread Dan Nelson
In the last episode (Jul 27), Dan Nelson said: In the last episode (Jul 27), Mike Spreitzer said: If I want to try to actually hold a 2GB table in RAM, is there anything I need to set in my.cnf to enable that? Just make sure your key_buffer_size is large enough to hold the index. You

Re: idle query

2010-07-26 Thread Dan Nelson
the fldrcv table ... so why is it taking so long to do this join to make the fldpar table? -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: idle query

2010-07-26 Thread Dan Nelson
:) -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Innodb Choosing Random Index

2010-07-11 Thread Dan Nelson
Another solution might be to create another index on (c1,c2), since that index is the most efficient one for your particular query. MySQL will always pick that index over the other two. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http

Re: update replace() regex

2010-07-08 Thread Dan Nelson
= replace(column, regex '%-%', ' ') where id = xxx; You don't need a regex for that. REPLACE(column, '-', ' ') should do what you want. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: selecting data for computation

2010-06-25 Thread Dan Nelson
to see is zeros, meaning that for some reason your mysql connection is getting dropped after your first query completed. Locks are held for the lifetime of a connection, so if you disconnect, your lock disappears. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing

Re: selecting data for computation

2010-06-24 Thread Dan Nelson
and no index on work_data... -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Missing database file names

2010-06-03 Thread Dan Nelson
, b.frm, b.MYI, b.MYD, etc, then run show create table a etc to determine the table layout and match them up to known mythtv tables. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Geting current user pasword.

2010-06-03 Thread Dan Nelson
authentication. It's all done with hashed versions. You'll probably have to cache the original password used to make the connection, if you need to use it again later. http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General

Re: MySQL and Syslog

2010-05-15 Thread Dan Nelson
#option_mysqld_safe_syslog Next best solution: tail -F -n 0 /path/to/mysql.err | logger -p daemon.notice -t mysql Run that before starting mysql, and any lines written to the log file will get redirected to syslog. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List

Re: C API Function for count(*)

2010-05-14 Thread Dan Nelson
a simple code fragment to print a resultset on this page: http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-row.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-03 Thread dan
It works great for me. After working out the bugs and adding the spatial index I am now searching in the 0.05 second timeframe vs. minutes otherwise. Dan On Sun, 2 May 2010 23:39:41 -0700, Rob Wultsch wult...@gmail.com wrote: On Sat, May 1, 2010 at 11:12 PM, dan d...@tappin.ca wrote

mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
a specific point. Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
data. Dan On Sun, 2 May 2010 06:43:13 -0700, Ted Yu yuzhih...@gmail.com wrote: I think you may have seen this: http://dev.mysql.com/doc/refman/5.0/en/relations-on-geometry-mbr.html On Sat, May 1, 2010 at 11:12 PM, dan d...@tappin.ca wrote: Can any one help me with understanding

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
101.36211395) | +---+ But after my UPDATE my poly column is still full of NULL values. Dan On Sun, 2 May 2010 13:34:14 -0400, Baron Schwartz ba...@xaprb.com

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
of PolygonFromText ? On Sun, May 2, 2010 at 10:59 AM, dan d...@tappin.ca wrote: I am still lost... I tried this: UPDATE `grid` SET poly = PolygonFromText(CONCAT('POLYGON(',n,' ',e,', ',s,' ',e,', ',s,' ',w,', ',n,' ',w,', ',n,' ',e,')')); I had my delimiters mixed up and I know my

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
14:00:16 -0700, Ted Yu yuzhih...@gmail.com wrote: Have you declared poly to be of spatial type ? Cheers On Sun, May 2, 2010 at 1:03 PM, dan d...@tappin.ca wrote: Tried it but no luck: mysql UPDATE `grid` SET poly = GeomFromText(CONCAT('POLYGON(',n,' ',e,', ',s,' ',e,', ',s

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
need to figure out the rest of it... Dan On Sun, 2 May 2010 14:00:16 -0700, Ted Yu yuzhih...@gmail.com wrote: Have you declared poly to be of spatial type ? Cheers On Sun, May 2, 2010 at 1:03 PM, dan d...@tappin.ca wrote: Tried it but no luck: mysql UPDATE `grid` SET poly

Re: Best index for searching on lat / long data i.e. decimal vs. float

2010-05-01 Thread dan
On Sat, 01 May 2010 15:28:46 -0500, mos mo...@fastmail.fm wrote: SELECT * FROM `grid`� force index(section) WHERE n 49.012 AND s 49.012 AND e 110.0244 AND w 110.0244; It should give you the answer around 0.1 seconds. Give it a try. :-) Mike It actually makes it worse

Best index for searching on lat / long data i.e. decimal vs. float

2010-04-30 Thread dan
the specific area that the point is located in. I tried a simple index with my n,e,s w but it still takes along time to run such a query i.e. phpmyadmin times out. Any idea on the best structure for such a query? Thanks, Dan T -- MySQL General Mailing List For list archives: http

Re: Best index for searching on lat / long data i.e. decimal vs. float

2010-04-30 Thread dan
an average of 15 seconds Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: How to select rows from only the first N rows in a table?

2010-04-27 Thread Dan Nelson
products, even if they are the 10 newest records in the table. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Make delete requests without impact on a database

2010-04-14 Thread Dan Nelson
if there are other SELECT statements pending. http://dev.mysql.com/doc/refman/5.1/en/delete.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: CLI can't read data from table

2010-04-14 Thread Dan Nelson
PRIMARY KEY) ENGINE=InnoDB; Query OK, 0 rows affected (0.20 sec) Yup, that was it. I'm migrating from Postgres, so it never occured to me that lines might be reserved. On the plus side, you can now use the word vacuum :) -- Dan Nelson dnel...@allantgroup.com -- MySQL

Re: Recommended swap partition size

2010-04-13 Thread Dan Nelson
and they all live just fine without swap. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: MyISAM better than innodb for large files?

2010-04-02 Thread Dan Nelson
, and as your number of concurrent readers and writers grows, the improvement in performance from using innodb over myisam becomes more pronounced. His scenario is perhaps updated once a year, though, so crash recovery and multiple writer performance is not important. -- Dan Nelson

Re: Is Mysql for freebsd 8.0 available?

2010-03-17 Thread Dan Nelson
doesn't provide binaries, but the FreeBSD ports tree lets you build it yourself, and has ports for MySQL 3.23, 4.0, 4.1, 5.0, 5.1, and 5.5. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: mysql RAID

2010-03-10 Thread Dan Nelson
have to worry about that. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: 5.1.44 community version select ordno=' ' error (2)

2010-03-03 Thread Dan Nelson
* from t1 where ordno=' ' ordno qty 'aaa' 18 'b' 20 mysql version 5.1.44 still with the bug Best regards! Shuming Wang -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: 5.1.42 community version select ordno=' ' error (2)

2010-03-01 Thread Dan Nelson
| +---+ | | | | | | | 000 | | abc | +---+ 5 rows in set (0.00 sec) mysql -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: EXPLAIN says DEPENDENT SUBQUERY despite no free variables

2010-02-24 Thread Dan Nelson
treat subqueries as dependent, even ones that are obviously not. The 6.0 branch was a significant improvement, but that branch has been killed off, and there's no indication of the fixes being backported to 5.x . -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List

Re: Event feature already working in Server 5.1.37

2010-01-27 Thread Dan Nelson
- Win, Windows Scripting Host, MySQL WTM - Win, Tomcat, MySQL ... Are there other stacks on MS that you have heard of or are using? WWJD - Windows, Websphere, Java, Derby? :) -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http

Re: Event feature already working in Server 5.1.37

2010-01-25 Thread Dan Nelson
will also fire the same whether the server is running Unix or Windows. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Subquery performance slow to non-existent...

2010-01-19 Thread Dan Nelson
with queries A and B. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: query returning empty row

2010-01-17 Thread Dan Nelson
,cCurstatus,cMmrcashworker,cHospital,cHospital1,cHospital2 FROM med_patient WHERE updateDate between '2010-01-01' and '2010-01-28' order by id desc and verify that the other fields in your WHERE clause have the values you think they do. -- Dan Nelson dnel...@allantgroup.com

Re: Better that `NOT IN`

2010-01-15 Thread Dan Nelson
this as two separate queries. One for the 'inner' select to get an array of orderID and then shove those back into the 'outter' query using PHP's implode() or something. I suspect this would be significantly faster no? IN() using constants should be very efficient. -- Dan Nelson

Re: Can't open file error number 24

2010-01-10 Thread Dan Nelson
#sysvar_open_files_limit http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_table_open_cache http://dev.mysql.com/doc/refman/5.1/en/table-cache.html http://bugs.mysql.com/bug.php?id=17646 http://bugs.mysql.com/bug.php?id=24509 -- Dan Nelson dnel...@allantgroup.com -- MySQL

RE: table export in cron

2010-01-07 Thread Dan
. Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Consult with group

2009-11-28 Thread Dan Nelson
#function_group-concat -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Table size vs Memory requirements?

2009-11-22 Thread Dan Nelson
need to do one disk seek per lookup). Next best would be enough to cache all but the leaves of the index (requiring one index and one table seek per lookup); this depends on your key size but 200MB should be enough. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing

Re: MySQL - determine last date of shutdown and analyze

2009-10-26 Thread Dan Nelson
logfile (in your data directory, it's the only file ending in .err). I don't think any of the storage engines keep track of when the last analyze was done, though. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: Low performance due high network latency - batching ?

2009-10-21 Thread Dan Nelson
); -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Error - Select Column Not Found Within Trigger

2009-10-17 Thread Dan Saul
// DELIMITER ; CREATE TABLE `products` ( `id` int(11) NOT NULL auto_increment, `description` text collate utf8_bin NOT NULL, `daily_charge` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=4 ; Thank you in advance. Dan

Re: Error - Select Column Not Found Within Trigger

2009-10-17 Thread Dan Saul
CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ; - michael dykman On Sat, Oct 17, 2009 at 2:20 PM, Dan Saul daniel.s...@gmail.com wrote: This is the first time I have attempted to expand beyond basic sql for storing data in a table like structure. So my level of knowledge is familiar

Re: Dump / restore rows in table?

2009-10-07 Thread Dan Nelson
include the table name, so if you're loading into a different table, you'll need to rewrite the output with sed, or maybe create a select * from oldtable view on your first server that matches the table name on the second server, so your table names match. -- Dan Nelson dnel

Re: many-inserts go faster the second time

2009-09-25 Thread Dan Nelson
data into RAM, which makes for much faster lookups on the next run. What do top and iostat stats show on both runs? I'd expect heavy disk usage and little CPU on the first run, and light disk and heavier CPU usage on the second. -- Dan Nelson dnel...@allantgroup.com -- MySQL

Re: Access denied; you need the RELOAD privilege for this operation

2009-09-20 Thread Dan Nelson
be a drawback here, if it's more at the operational level of old Berkely DB 1.x-style databases (where one has to manually maintain the index, there are no transactions, etc). SQL-based databases sit on top of the lower-level table engines and handle all that work for you. -- Dan Nelson

Re: Right Date format mask

2009-09-14 Thread Dan Nelson
is in mm/dd/yyy format, you would want a format string of %m/%e/%Y %r. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: InnoDB doubles size when converting from MyIsam

2009-09-12 Thread Dan Nelson
-physical-record.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Very Slow Query

2009-08-28 Thread Dan Nelson
? -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Very Slow Query

2009-08-28 Thread Dan Nelson
. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Inquiry:MySql table data missing problem

2009-08-19 Thread Dan Nelson
code 145: Table was marked as crashed and should be repaired $ You need to repair your table: http://dev.mysql.com/doc/refman/5.1/en/repair.html -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: show tables is slow/uncached

2009-08-16 Thread Dan Nelson
in your own table might be the best solution. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Erratic query performance

2009-08-13 Thread Dan Nelson
on r.comm_id = c.Comm_id where recordtype = INDIVIDUAL and c.party = D and r.amount = 1 Returns 294 records. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Slow performance Query

2009-08-11 Thread Dan Nelson
| | ++-+--+--+---+-+-+---+--+---+ 1 row in set (0.01 sec) -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch

Re: When does indexing happen?

2009-07-26 Thread Dan Nelson
it using the index? Yes. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Slow query Performance

2009-07-16 Thread Dan Nelson
to the table rows to fetch result_id). If you also add result_id to your compound index, then mysql will be able to get all its information from the index without having to go to the table at all. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives

Re: Another Trigger Question!

2009-07-08 Thread Dan Nelson
IF; END; I have my idea of a trigger above that for obvious reasons wont work , however describes what im trying to do best! Im monitoring a value status and if it changes id like to insert a record into a entirely separate table in a separate DB. insert into smsgw.outbox [...] -- Dan

Re: Triggers For Radius DB

2009-07-07 Thread Dan Nelson
); SET NEW.AcctOutputOctets=(0 - NEW.AcctOutputOctets): END IF; -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: What OS is the best platform for MySQL ?

2009-07-06 Thread Dan Nelson
does not end although complied with LINUX_THREADS. Try building without LINUX_THREADS; that option shouldn't really be used with FreeBSD 6 or newer. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: How to use LIKE for detecting numbers with commas?

2009-07-06 Thread Dan Nelson
('8',numbers); http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_find-in-set -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch

Re: Custom agregate functions

2009-06-30 Thread Dan Nelson
In the last episode (Jun 30), Dainis Polis said: Hi MySQL fans! Is there way to create subj ? http://dev.mysql.com/doc/refman/5.1/en/adding-functions.html http://dev.mysql.com/doc/refman/5.1/en/adding-udf.html http://dev.mysql.com/doc/refman/5.1/en/udf-aggr-calling.html -- Dan

Re: How to Optimize distinct with index

2009-06-19 Thread Dan Nelson
of create table user, a sample query, and its EXPLAIN output. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: Half Hour Sub-query in MySQL vs. 5 Seconds in VFP?

2009-06-19 Thread Dan Nelson
). The first query uses the ename index and estimates it will return one row. The second query uses the mgr index based on the empno value returned by the first query and estimates it will return 2 rows. Much better :) -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing

  1   2   3   4   5   6   7   8   9   10   >