Re: please help optimize this query

2006-06-01 Thread Joseph Alotta
, 2006 12:25:50 PM CDT To: Joseph Alotta [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: please help optimize this query I'd start by looking at your schema.. Quite a lot of use of varchars... I'd suggest using chars (takes more space but processes faster).. Or even better, normalize

please help optimize this query

2006-05-31 Thread Joseph Alotta
Greetings, I generate this report of all the holdings by symbol, summing up over accounts. It is taking much too long. I was wondering if I can add an index on something to make it more efficient. The first query gets the most recent date, the next query sums it up by symbol. Thank

basic questions: setting a variable and using a column name

2005-12-26 Thread Joseph Alotta
greetings, I know this is pretty basic stuff, but I couldn't find an answer in google. 1. I want to set the @maxdate variable, but mysql complains. What am I doing wrong? 2. The 3rd to the last line: and (p.value - t.amount) -1000 I wanted to say diff -1000 but mysql

Re: sequential id

2005-12-16 Thread Joseph Alotta
Greetings, Thank you Dahl and Xiaobo. Here it is working for all to see. I particularly like that it doesn't try to use a key again once it is deleted. Joe. mysql use names; Database changed mysql create table people ( id mediumint unsigned not null auto_increment, - first

sequential id

2005-12-15 Thread Joseph Alotta
Greetings, I have a bunch of names and addresses that I am adding to MySql database. I would like to automatically assign a unique sequence number to each person. Is there a way to do this easily? idname 1 bob jones 2 larry smith 3 henry rogers Thanks for you help,