Re: Multipart + IN comparison on the second part + JOIN does not use full index

2007-10-03 Thread Eamon Daly
After spending half the night trying this same query on a number of different datasets, it looks like sometimes MySQL /will/ use all parts in certain cases, so I'm satisfied by that. Thanks for responding! Eamon Daly - Ori

Multipart + IN comparison on the second part + JOIN does not use full index

2007-10-02 Thread Eamon Daly
27;) Is this expected behavior? It surprised me that the second query would take full advantage of the index but not the third. We're using MySQL 4.1.20. Eamon Daly -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Avoiding disk writes during CREATE TEMPORARY

2006-02-17 Thread Eamon Daly
n size, and the MEMORY storage type never converts to on-disk tables, that's really not a good solution. How does MySQL determine whether a table is written to memory or to disk, and is there a way to force the former? ____ Eamon Dal

Re: "tmpdir" option

2006-02-01 Thread Eamon Daly
That's exactly right (the "few writes" part, not the "knowing what I'm doing" part): this particular machine only runs reports a few times a day. ________ Eamon Daly - Original Message - From: "Jan

"tmpdir" option

2006-02-01 Thread Eamon Daly
would easily overrun the smaller disk. ____ Eamon Daly -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: NULL, OR, and indexes

2005-12-12 Thread Eamon Daly
Yep, I forgot to mention that I'm using MySQL 4.1, which does support ref_or_null, but only for the first column. Eamon Daly - Original Message - From: "Dan Nelson" <[EMAIL PROTECTED]> To: "Eam

NULL, OR, and indexes

2005-12-12 Thread Eamon Daly
1, b2, b3), but obviously that gets thrown out because of the OR. Is there a Better Way to either rewrite the WHERE condition or break out b to allow indexes to be used? ____ Eamon Daly -- MySQL General Mailing List For list archives: http:/

Re: PK or simple key?

2005-11-11 Thread Eamon Daly
Got it. Thanks to all who replied: speed is the primary concern here, so I'll be going with the first approach, especially since I could use the unique constraint. Eamon Daly - Original Message - From: "Mart

PK or simple key?

2005-11-10 Thread Eamon Daly
x27;d guess the latter is the Right Way, since the index will be significantly smaller, but then I still need to go to the table to retrieve foo_id. ________ Eamon Daly -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq

Re: Insert Into problem

2005-08-30 Thread Eamon Daly
cting from. ________ Eamon Daly - Original Message - From: "Ed Reed" <[EMAIL PROTECTED]> To: Sent: Tuesday, August 30, 2005 3:08 PM Subject: Insert Into problem Can anyone please tell me why this fails, I've done this type of thing before witho

Re: MyISAM vs. InnoDB for an AUTO_INCREMENT counter table

2005-08-24 Thread Eamon Daly
't be entirely uncommon: I'm pretty sure I've seen a similar example in the Cookbook. ____ Eamon Daly - Original Message - From: <[EMAIL PROTECTED]> To: "Eamon Daly" <[EMAIL PROTECTED]> Cc:

MyISAM vs. InnoDB for an AUTO_INCREMENT counter table

2005-08-24 Thread Eamon Daly
locks. Has anyone found significant speed increases or better concurrency by switching over to InnoDB for such a table? ________ Eamon Daly -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists

Re: Efficient select/insert

2005-05-19 Thread Eamon Daly
my $sql = sprintf <<'EOF', join(',', @array); SELECT col2, col3, col4 FROM table1 WHERE col1 IN (%s) EOF my $sth = $dbh->prepare($sql); $sth->execute() or die $sth->errstr(); ____ Eamon Daly - Orig

Re: Report(query)

2005-05-12 Thread Eamon Daly
7;%Y-%m-%d') AS date, SUM(process), SUM(pending), SUM(wip) FROM tab GROUP BY date; SELECT 'Summary', SUM(process), SUM(pending), SUM(wip) FROM tab; ________ Eamon Daly - Original Message - From: "Seena Blace" &

Re: Sorting by relevance?

2005-05-09 Thread Eamon Daly
word. Eamon Daly - Original Message - From: "Erik Bukakis" <[EMAIL PROTECTED]> To: "MySQL Discussion List" Sent: Monday, May 09, 2005 2:10 PM Subject: Sorting by relevance? I just learned a lot stu

Re: host info

2005-04-28 Thread Eamon Daly
+ | [EMAIL PROTECTED] | localhost| +-+--+ More details in the usual place: http://dev.mysql.com/doc/mysql/en/information-functions.html ____ Eamon Daly - Original M

Re: REPLACE function

2005-04-28 Thread Eamon Daly
ds and various common abbreviations ('x', 'ext.', and 'EX', for instance). In the future, you should probably try to clean up your data before it gets into the database. It'll make your life a lot easier. __

Re: host info

2005-04-27 Thread Eamon Daly
I don't know if it's possible in MySQL. That said, in the mysql client, you can type '\s' for 'status'. Look for 'Current user' in the output. ____ Eamon Daly - Original Message - From: "

Re: extract numeric value from a string.

2005-04-26 Thread Eamon Daly
| +-+--+--+--+ Same concept, but the LOCATE finds the first occurrence of the casted number. Then add the length of the casted number et voila. Eamon Daly - Original Message - From: "gerald_

Re: extract numeric value from a string.

2005-04-22 Thread Eamon Daly
) Eamon Daly - Original Message - From: "dixie" <[EMAIL PROTECTED]> To: "MySQL" Sent: Friday, April 22, 2005 6:18 PM Subject: extract numeric value from a string. Hi at all, I've this necessity. In a table I've a field popolated by a string where the

Re: zip code search within x miles

2005-04-19 Thread Eamon Daly
os(b.latitude/57.2958) * cos(b.longitude/57.2958 - a.longitude/57.2958) ) <= 5 # <-- Your target radius GROUP BY distance They both achieve similar results; anyone have a feel for which is "better"? ____ Eamon Daly -

Re: zip code search within x miles

2005-04-19 Thread Eamon Daly
de) | +--+-+ |70443 | 42471 | +--+-+ Can't take credit for the SQL, by the way; I'm pretty sure I found it on Google. Eamon Daly - Original Message - From: "

Re: remove newline hack?

2005-04-15 Thread Eamon Daly
#x27;\n', ''); If you only want to drop trailing carriage returns and line-feeds, you can use TRIM instead: SELECT TRIM(TRAILING '\r\n' FROM log) FROM test; See "String Functions" in the manual: http://dev.mysql.com/doc/mysql/en/string-functions.html _

Re: Find valid numeric values in a string field?

2005-04-11 Thread Eamon Daly
cetera. REGEXP is explained here: http://dev.mysql.com/doc/mysql/en/regexp.html Eamon Daly - Original Message - From: "Dan Bolser" <[EMAIL PROTECTED]> To: Sent: Sunday, April 10, 2005 10:10 AM Subject: Find valid numeric values in a stri

Re: Replacted MERGE table?

2005-04-06 Thread Eamon Daly
UE keys. The workaround would be to add a column that contains the master id and convert your key to multipart, incorporating that field. ____ Eamon Daly - Original Message - From: "Eric Anderson" <[EMAIL PROTECTE

Re: SELECT help

2005-03-28 Thread Eamon Daly
.com/mysql-book/ ____ Eamon Daly - Original Message - From: "Grant Giddens" <[EMAIL PROTECTED]> To: Sent: Monday, March 28, 2005 6:00 PM Subject: SELECT help Hi, I am tring to do a select from 2 tables. Table1: sku title Table 2:

Locking and MERGE tables

2005-03-28 Thread Eamon Daly
there a Right Way to move a row from "foo_1" to "foo_2" short of explicitly locking "foo"? It seems unwieldy to have to supply the names of any and all MERGE tables to my routine. Eamon Daly -- MySQL General

Re: QUERY ordering clarification

2005-03-28 Thread Eamon Daly
the MySQL docs: http://dev.mysql.com/doc/mysql/en/string-functions.html ________ Eamon Daly - Original Message - From: "Grant Giddens" <[EMAIL PROTECTED]> To: Sent: Monday, March 28, 2005 11:43 AM Subject: QUERY ordering c

Re: a very tricky string extraction

2005-03-24 Thread Eamon Daly
WHERE log like '%tested this%'; As mentioned by others in the thread, this is fine as a stopgap, but you should change your table ASAP. ____ Eamon Daly - Original Message - From: "Keith Ivey" <[EMAIL PROTECTED]>

Re: a very tricky string extraction

2005-03-24 Thread Eamon Daly
SELECT LEFT(SUBSTRING_INDEX(LEFT(log, LOCATE('\n', log, LOCATE('tested this', log)) - 1), '\n', -1), 8) FROM test WHERE log LIKE '%tested this%' Don't try this at home. ____ Eamon Daly - Or

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

2005-03-09 Thread Eamon Daly
slave. The slave server is running MySQL 4.0.20. ________ Eamon Daly - Original Message - From: "Keith Ivey" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 09, 2005 2:11 PM Subject: Re: safe way of replication? At

Re: Compressing after Deletion

2005-03-09 Thread Eamon Daly
http://dev.mysql.com/doc/mysql/en/myisam-storage-engine.html OPTIMIZE TABLE: http://dev.mysql.com/doc/mysql/en/optimize-table.html DELETE: http://dev.mysql.com/doc/mysql/en/delete.html ____ Eamon Daly - Original Message - From: <[E

Re: insert data

2005-02-28 Thread Eamon Daly
d make sure that each of your execute parameters have some value prior to the execute. Eamon Daly - Original Message - From: "Gerald Preston" <[EMAIL PROTECTED]> To: "'Michael Stassen'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; Sent

Re: Generating ticket/file numbers

2005-02-16 Thread Eamon Daly
.html Eamon Daly - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, February 16, 2005 3:35 PM Subject: Generating ticket/file numbers Hi there is there any way at all that with a special field type mysql can generate file numbers like so AUD-

Re: Fixed with Fields

2005-01-28 Thread Eamon Daly
| foox | +--+ ____ Eamon Daly - Original Message - From: "Marc Michalowski" <[EMAIL PROTECTED]> To: Sent: Friday, January 28, 2005 12:27 PM Subject: Fixed with Fields I was wondering if there is a way to create fixed wid

Re: orderbymonths

2005-01-25 Thread Eamon Daly
27;Oct', 'Nov', 'Dec'); +--+---+ | name | month | +--+---+ | bar | Jan | | foo | Mar | | qaax | Apr | | baz | May | | quux | Nov | | qiix | Dec | +--+---+ 6 rows in set (0.00 sec)

Re: On but off topic Putting a file in Ram

2004-11-23 Thread Eamon Daly
one that, you can do plenty of things to speed up or scale your system, such as mapping the files to memory with mod_file_cache, judicious use of a caching proxy, or the creation of a ramdisk. ____ Eamon Daly - Original Message - Fro

Re: Best Practices

2004-11-10 Thread Eamon Daly
t too large" problems, but I couldn't find confirmation in the docs. If I set max_allowed_packet to, say, 16M on the master, does it write the data from a LOAD DATA INFILE command in 16M chunks to the binary log? ____ Eamon Daly - O

Re: Best Practices

2004-11-10 Thread Eamon Daly
. Eamon Daly - Original Message - From: "Michael Haggerty" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 09, 2004 6:06 PM Subject: Best Practices I am working on a data warehousing solution involving mysql and have a question about best practices.

Re: Emulating timediff in 4.0 ?

2004-11-09 Thread Eamon Daly
You need to be careful when subtracting dates-- if you treat them like integers, you'll probably not get the results you were expecting. Here's more discussion from the archive: http://lists.mysql.com/mysql/172921 ________

Re: Emulating timediff in 4.0 ?

2004-11-09 Thread Eamon Daly
5261 date 2 in seconds: 883634399 diff in seconds: -169138 diff in hh:mm:ss: -46:58:58 So you've got that going for you. Eamon Daly - Original Message - From: "listsql listsql" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL P

Re: Calculating a value based on an aliased column

2004-10-26 Thread Eamon Daly
WHEN out_method = 'Multiply' THEN @p1 * out_value -> WHEN out_method = 'Divide' THEN @p1 / out_value -> END) as phase_2 -> FROM filter -> GROUP BY name -> ; ++--+-+-+ | id | name | phase_1 | phase_2 | ++--+-+

Calculating a value based on an aliased column

2004-10-25 Thread Eamon Daly
/ in_value END as phase_2 FROM filter But, of course, that results in "ERROR 1054: Unknown column 'phase_1' in 'field list'". Do I need to create a temporary table just to hold all the phase_1 values? Ultimately, I want to group by name, so that seems like an awfully

Re: first day of week/month

2004-10-19 Thread Eamon Daly
As a side note, Paul DuBois lists several useful date calculations such as last day of the month on pages 265-267 of the MySQL Cookbook (O'Reilly). He uses a DATE_SUB routine for generating the first of the month, so maybe his way is faster. _____

Re: Number of Rows in DB.

2004-10-14 Thread Eamon Daly
$tables{$ARGV[0]}{$table}, $ARGV[0], $tables{$ARGV[1]}{$table}, $ARGV[1]) if $tables{$ARGV[0]}{$table} != $tables{$ARGV[1]}{$table}; } Run like so: $ ./whee.pl production standby Table `users` differs (6 rows in production, 8 rows in standby) __

Re: Number of Rows in DB.

2004-10-14 Thread Eamon Daly
/tmp/count Creates output like so: 20,21c20,21 < 3 users.txt < 952 total --- 6 users.txt 955 total ____ Eamon Daly - Original Message - From: "Michael J. Pawlowsky" <[EMAIL PROTECTED]> To: &

Re: Where clause question

2004-10-11 Thread Eamon Daly
aster, assuming you actually want the value of discount in the result of the SELECT. Otherwise, you're doing the calculation twice. No idea if that's true, though, so maybe someone else can give a definitive answer. ____ Eamon Daly

Re: Where clause question

2004-10-11 Thread Eamon Daly
r HAVING. ____ Eamon Daly - Original Message - From: <[EMAIL PROTECTED]> To: "Ed Lazor" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, October 11, 2004 3:51 PM Subject: Re: Where clause question Because

Re: Date Indexing

2004-09-23 Thread Eamon Daly
I'm interested in this, too. We have a logging table that sees hundreds of rows per second, and we do a ton of monthly reports. We just bit the bullet and added an indexed DATE column. Is there a better strategy? Eamon

Re: Anomaly in date subtraction

2004-09-21 Thread Eamon Daly
-+ | 42 | 2 | +--+---+ 1 row in set (0.00 sec) ____ Eamon Daly - Original Message - From: "Gleb Kozyrev" <[EMAIL PROTECTED]> To: "Eldo Skaria" <[EMAIL PROTECTED]> Cc: &q

Re: Anomaly in date subtraction

2004-09-21 Thread Eamon Daly
-+ | 42 | 2 | +--+---+ 1 row in set (0.00 sec) ____ Eamon Daly - Original Message - From: "Gleb Kozyrev" <[EMAIL PROTECTED]> To: "Eldo Skaria" <[EMAIL PROTECTED]> Cc: &q

Re: How to select field names?

2004-09-07 Thread Eamon Daly
11) NOT NULL default '0', `type` enum('key0','key1','key2','other1','other2') NOT NULL default 'key0', `data` text NOT NULL, KEY `id_type` (`id`,`type`) ) TYPE=MyISAM You'll save a ton of space, and your queries will probably

Re: Suppression of result in SELECT @temp := column?

2004-09-02 Thread Eamon Daly
E TEMPORARY TABLE last_id SELECT id FROM users ORDER BY id DESC LIMIT 1; > SELECT users.* FROM users JOIN last_id USING (id); > EOF id first lastemail 3 testy mctest [EMAIL PROTECTED] but using @id seems less, well, wasteful. ____

Re: Suppression of result in SELECT @temp := column?

2004-08-31 Thread Eamon Daly
Did anyone ever follow up on this question? I'm looking for the answer, too. Eamon Daly - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 25, 2004 9:16 AM Subjec

Re: MySQL Secure Connection(e.g. SSL) Question

2004-08-25 Thread Eamon Daly
n the server. There's more on the subject at mysql.com: http://dev.mysql.com/doc/mysql/en/Secure_requirements.html ________ Eamon Daly - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesd

Re: Brainstorming' time!

2004-08-20 Thread Eamon Daly
And, apparently, my perl solution completely reinvented the wheel. See pp.527-530 "MySQL Cookbook", 1st ed. for a better script. ____ Eamon Daly - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTEC

Re: Brainstorming' time!

2004-08-20 Thread Eamon Daly
t;write($row, $col, $_->[0]); $col++; } for (@{ $dbh->selectall_arrayref("SELECT * FROM $table") }) { $col = 0; $row++; for (@{ $_ }) { $worksheet->write($row, $col, $_); $col++; } }

Re: CSV Output

2004-08-12 Thread Eamon Daly
for the composition and decomposition of comma-separated values. An instance of the Text::CSV class can combine fields into a CSV string and parse a CSV string into fields. ____ Eamon Daly NextWave Media Group LLC Tel: 1 773 975-

Re: [OT] PostgreSQL / MySQL Data Dictionary

2004-08-11 Thread Eamon Daly
E TABLE DSL ( Full_Name varchar(40) NOT NULL default '', Framed_IP_Address varchar(16) NOT NULL default '' ) TYPE=MyISAM; et cetera. ____ Eamon Daly - Original Message - From: "SciBit MySQL Team

Re: Export and destroy relation

2004-08-06 Thread Eamon Daly
$_->[0] } @{ $dbh->selectall_arrayref($serials) }) ) . "\n"; } Eamon Daly - Original Message - From: "Scott Haneda" <[EMAIL PROTECTED]> To: "MySql" <[EMAIL PROTECTED]> Sent: Wednesday, August 04, 2004 7:49 PM Subject: Expor

Re: Best options for unique string

2004-08-04 Thread Eamon Daly
further limiting treachery. Most importantly, you should know that no hashing algorithm is perfect, RAND() isn't entirely random, and security is Not Easy. Here's some reading material: http://www.linktionary.com/h/hash_function.html http://en.wikipedia.org/wiki/SHA-1 http://aspnet.4guysfromrolla.com/articles/112002-1.aspx Eamon Daly -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: JOIN/WHERE and index confusion

2004-07-30 Thread Eamon Daly
0101235959 GROUP BY c.d_id, c.e_id This report takes over an hour when looking at just one month's worth of data. It's brutal. Any and all suggestions would be appreciated. ____ Eamon Daly - Original Message - From: &q

Re: Installing MySQL Databases on RAM Drive

2004-07-30 Thread Eamon Daly
e RAM disk, make a backup copy somewhere, and start both MySQL servers. This setup wouldn't require changing any SQL. ____ Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 -- MySQL General Mailing List For list

Re: JOIN/WHERE and index confusion

2004-07-29 Thread Eamon Daly
I would assume it would use reporting_id_t, since the WHERE clause has both a.a_id and a.timestamp in it. Eamon Daly - Original Message - From: "gerald_clark" <[EMAIL PROTECTED]> To: "Eamon Daly&qu

Re: JOIN/WHERE and index confusion

2004-07-28 Thread Eamon Daly
TWEEN 2004010100 AND 20040101235959 and it /still/ only uses reporting_t! What the heck am I missing? Eamon Daly - Original Message - From: "Eamon Daly" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

JOIN/WHERE and index confusion

2004-07-28 Thread Eamon Daly
_id`) But EXPLAIN shows that MySQL isn't even considering the key on a, and chooses the primary key on c over my index. Clearly I'm confused about how indexes are used in a JOIN/WHERE situation: can anyone enlighten me? ____ Eamon Daly

Re: Query from mulitple tables where data will only be in one table but that table unkown

2004-07-06 Thread Eamon Daly
ull_Name | Framed_IP_Address | ++---+---+ | DIALUP | Tom | 127.0.0.1 | | DSL| Jane | 127.0.0.1 | ++---+-------+ 2 rows in set (0.00 sec) Eamon Daly

Re: Query Problem with Lists

2004-06-24 Thread Eamon Daly
ength rows to fixed, and you'll now be able to index bar properly. You'll see a dramatic performance improvement. ____ Eamon Daly - Original Message - From: "Eric Scuccimarra" <[EMAIL PROTECTED]> To: <[EMAI

Re: Fetching 12 columns or 1 TEXT field?

2004-06-24 Thread Eamon Daly
22 quatloos for you! Yeah, in retrospect, I imagine Dan's on the money: the seek time is where the money's at. Thanks for the feedback, all! ________ Eamon Daly - Original Message - From: "Frank Bax" <[EMAIL

Fetching 12 columns or 1 TEXT field?

2004-06-23 Thread Eamon Daly
runs each came out just about equal, which surprised me a little. Eamon Daly -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Problems with boolean keyword search

2004-06-17 Thread Eamon Daly
FYI, MySQL allows boolean searching as of 4.0.1. See: http://dev.mysql.com/doc/mysql/en/Fulltext_Boolean.html Or pp. 256-257 of MySQL, 2nd Ed. by Paul DuBois for several examples. Eamon Daly - Original Message - From

Re: Date/Time Difference Calculations

2004-06-11 Thread Eamon Daly
You probably want SEC_TO_TIME: http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html SELECT a as start, b as end, SEC_TO_TIME(end - start) FROM table Eamon Daly - Original Message - From: "Dirk Bremer

Re: Indexes ignored when using SELECT foo FROM a, b?

2004-05-17 Thread Eamon Daly
d |1 | Using where; Using index | +-++--+--+-- ---++--+--+ But, of course, those UNIONs still mean a full join. Is this as good as I'm going to get? Thanks for the previous replies! ____ Eamon Daly NextWave Media Group LLC

Indexes ignored when using SELECT foo FROM a, b?

2004-05-17 Thread Eamon Daly
han using the enum and a conditional, but that seems really unwieldy and slow (3 selects and then a UNION). Suggestions? I'm on MySQL 4.0.18, by the way, so subselects aren't an option. Eamon Daly NextWave Media Group LLC Tel: 1

Re: Perl Modelues

2004-04-07 Thread Eamon Daly
install_Perl_modules ____ Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 - Original Message - From: "Kirti S. Bajwa" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 07, 2004 1:5

Re: mysql support question

2004-03-26 Thread Eamon Daly
Perl's Win32::SerialPort (or Device::SerialPort) coupled with DBI and DBD::mysql would do it in a dozen lines or so. Docs for both are at http://search.cpan.org/. Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 77

Re: mysql support question

2004-03-26 Thread Eamon Daly
Perl's Win32::SerialPort (or Device::SerialPort) coupled with DBI would do it in a dozen lines or so. Docs for both are at http://search.cpan.org/. Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913

SELECT/UPDATE and locking issue

2004-03-16 Thread Eamon Daly
cement mentioned in the Cookbook (pp.647-648) is a good candidate in this scenario. ____ Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Unique IDs

2004-02-12 Thread Eamon Daly
You definitely don't want to use timestamping for unique IDs. You want to use an auto-incrementing column or similar. See http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html Eamon Daly NextWave Media Group LLC Tel: 1 773 975

Re: Query Question

2004-02-11 Thread Eamon Daly
SELECT * FROM test ORDER BY RAND() LIMIT 1; See pp. 694-695 in the MySQL Cookbook. Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 - Original Message - From: "Jack Lauman" <[EMAIL P

Re: There has to be a way to do this

2004-02-10 Thread Eamon Daly
Okay, the lack of locking was driving me crazy. Here's my version: #!/usr/bin/sh MYSQL="mysql -v test" ethernet_address=$1 cat < To: "gerald_clark" <[EMAIL PROTECTED]> Cc: "MySql List" <[EMAIL PROTECTED]> Sent: Tuesday, February 10, 2004 10:56 AM Subject: Re: There has to be a way to do this >

Re: SELECT statement w/ Min() & Group By

2004-01-29 Thread Eamon Daly
mp2.score; You can find this method of grouping under section 12.6 of the MySQL Cookbook: Finding Rows Containing Per-Group Minimum or Maximum Values. ____ Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 - O

Updating a table but avoiding locks

2004-01-29 Thread Eamon Daly
book (pp.647-648) is a good candidate in this scenario, so maybe what I'm doing is the only way until I get over my fear of deadlocks in InnoDB. Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 --

Index on DATETIME column?

2004-01-22 Thread Eamon Daly
dex on the first 8 characters of a DATETIME column? And if so, how do I reconstruct the WHERE to use it? Would this work: WHERE SUBSTRING(entered, 1, 8) = 20040124 ? I couldn't find any relevant info in the purple book. ____ Eamon Da

Table holes/Alternative to nightly optimizing?

2004-01-15 Thread Eamon Daly
e I'm unaware of? Would another table type outperform MyISAM under this scenario? ________ Eamon Daly NextWave Media Group LLC Tel: 1 773 975-1115 Fax: 1 773 913-0970 -- MySQL General Mailing List For list archives: http://lists.mysql.co