can compare their
other fields. And I want to run a query once a day over the whole
table to see if their are any repeats.
Does anyone have a clue how to do this?
Thanks :-)
Your Friend,
John
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
Does it makes sense that on a table of 100,000 rows that my DB is
crapping out with the following query?
SELECT * FROM jobs GROUP BY customer_number, job_number HAVING
count(*) 1 ORDER BY customer_number;
:-)
On 7/29/07, John Trammell [EMAIL PROTECTED] wrote:
From: John Kopanas [EMAIL
)
I found this on mysql:
http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html
I checked to see if root had File_priv and he/she does. I am
developing this on Mac OS X but I am deploying on a linux box.
Any input? :-)
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http
Directory existed but I did not have the right permissions on the
directory for the mysql user. Thanks my friend. :-)
On 5/28/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
John Kopanas wrote:
I am doing the following:
echo 'SELECT * FROM jobs WHERE id = 1 INTO OUTFILE
/Users/jkopanas
: Duplicate entry '5' for key 1
Why is the query trying to enter a duplicate entry?
This makes no sense to me :-).
Thanks
John
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing List
For list archives: http://lists.mysql.com
/07, John Kopanas [EMAIL PROTECTED] wrote:
I have the following query:
INSERT INTO summaries (entity_name, job_type, job_status)
(SELECT entity_name, GOV, Non-Workable FROM tmpSummaryTable);
The only other column I have is id and it is primary key autonumber int.
Why would I get the following
Mogens Melander
+45 40 85 71 38
+66 870 133 224
On Sat, April 7, 2007 20:19, John Kopanas wrote:
I have a query that looks something like this:
SELECT (c_o_w_inst_rev - c_o_w_estcost)/c_o_w_inst_rev
FROM tmpGovernmentSummaries
The problem is that sometimes c_o_w_inst_rev is 0 and dividing
of NULL? Can I test in the SELECT if c_o_w_inst_rev is 0 and return 0
and if not do the math?
Insight would be greatly appreciated :-)
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing List
For list archives: http
BY from_user_id;
In your original query I think you meant to select from, not to, since to will
be 1;
- Original Message -
From: John Kopanas [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Sunday, March 11, 2007 12:59 PM
Subject: Re: Finding a Solution To A Distinct Problem of Mine
I
:
SELECT DISTINCT to_user_id, created_at FROM messages WHERE to_user_id
= 1 ORDER BY created_at;
But the problem is that I only get distincts when I only have
to_user_id in the SELECT clause. Any suggestions.
I need to return everything on the latest row that has a distinct
from_user_id :-).
--
John
I think I got it:
SELECT * FROM (SELECT * FROM messages ORDER BY created_at DESC) as
messages WHERE to_user_id = 1 GROUP BY from_user_id;
Is this the best way about it... or are their better ways you suggest?
On 3/11/07, John Kopanas [EMAIL PROTECTED] wrote:
I have the following table
Ok, did not work... hmmm... any other suggestions?
On 3/11/07, John Kopanas [EMAIL PROTECTED] wrote:
I think I got it:
SELECT * FROM (SELECT * FROM messages ORDER BY created_at DESC) as
messages WHERE to_user_id = 1 GROUP BY from_user_id;
Is this the best way about it... or are their better
with ease :-). Any sexy suggetions? :-)
Your Friend,
John
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
860.674.8796 / FAX: 860.674.8341
-Original Message-
From: John Kopanas [mailto:[EMAIL PROTECTED]
Sent: Friday, November 24, 2006 11:13 AM
To: mysql@lists.mysql.com
Subject: Having Problem With Load Files and AutoNumber id fields
Argh... I am autogenerating a load file after parsing
is:
innodb_buffer_pool_size | 8388608
That looks like 8MB... that sounds small if I have a DB with over 1M
rows to process. No?
Thanks again for your help.
Your Friend,
John
On 11/25/06, Dan Nelson [EMAIL PROTECTED] wrote:
In the last episode (Nov 25), John Kopanas said:
Sorry about these questions
. InnoDB does
not keep track of how many rows are in a table, so it has to go count
them when you do a SELECT COUNT(*) or in your case SELECT COUNT(id).
That takes a little bit of time.
Dan
On 11/25/06, John Kopanas [EMAIL PROTECTED] wrote:
If I just SELECT id:
SELECT id FROM purchased_services
] wrote:
In the last episode (Nov 26), John Kopanas said:
Thanks a lot for your help.
The query should and only does return 1-6 rows depending on the id.
Never more then that. Here are the comperative EXPLAINs:
mysql EXPLAIN SELECT * FROM purchased_services WHERE id = 1000
Yes... with FORCE INDEX it still takes 7 seconds.
On 11/26/06, Dan Nelson [EMAIL PROTECTED] wrote:
In the last episode (Nov 26), John Kopanas said:
On 11/26/06, Dan Nelson [EMAIL PROTECTED] wrote:
In the last episode (Nov 26), John Kopanas said:
Thanks a lot for your help.
The query
? Why does mySQL think it is full but does not
think it exists at the same time? Help :-)
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
When I moved from type=memory to the default DB it worked fine. I am
starting to think that the quantity of rows i.e. 550K approx was too
much for my memory on my computer to handle. Does this make sense?
On 11/25/06, John Kopanas [EMAIL PROTECTED] wrote:
I create a memory table
that is a
PowerBook 867 with 756 MB of Ram.
Feedback and insight would be greatly appreciated.
Thanks my friends! :-)
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe
this on my laptop that is a
PowerBook 867 with 756 MB of Ram.
Feedback and insight would be greatly appreciated.
Thanks my friends! :-)
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http
/06, John Kopanas [EMAIL PROTECTED] wrote:
I tried the same tests with the database replicated in a MyISAM
engine. The count was instantaneous but the following still took
3-6seconds:
SELECT * FROM purchased_services WHERE (purchased_services.company_id = 535263)
The following though
accepting my numbers?
Thanks :-)
Does anyone also know how I can see the warnings created by loadfile?
All I just see is the summary with skipped and warnings.
Thanks :-)
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing
improve my query?
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
query?
--
John Kopanas
[EMAIL PROTECTED]
John,
I would split it into separate sql statements.
1) Create a memory table of the totals:
drop table if exists CompanyTotals;
create table CompanyTotals type=memory select Company_Id Id,
SUM(annual_service_charge) ServCharge
FROM
purchased_services
GROUP BY company_id;
This above gives me the company_id and service charge. How do I now
put that SUM(annual_service_charge) into
companies.total_annual_service_charge?
Thanks my friends :-).
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http
Ahhh... I did the following:
UPDATE companies c
SET total_annual_service_charge = (SELECT SUM(annual_service_charge)
FROM purchased_services ps WHERE ps.company_id = c.id);
What think you? :-)
On 11/22/06, John Kopanas [EMAIL PROTECTED] wrote:
I have two tables: companies, purchased_services
.
Should it be taking a long time? How long would some estimate it takes? Is
there a way to estimate how long it takes? What factors affect the time it
takes to create an index?
Thanks for your help.
Your Friend,
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http
resources.
Do a SHOW PROCESSLIST; to see if your index creation is blocked.
Dan
On 11/17/06, John Kopanas [EMAIL PROTECTED] wrote:
I have a mysql table with 100K rows approximately.
We are creating the following index:
create index closed_base_cust_and_job on
backlog_dev.closed_bases
Is there a command at the command line that can tell me if I am using MyISAM
or InnoDB? Thanks :-).
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
:-).
--
John Kopanas
[EMAIL PROTECTED]
http://www.kopanas.com
http://www.cusec.net
http://www.soen.info
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
I am trying to figure out how this would work? How does LOAD DATA
figure out when one column begins and another ends when some of the
data are addresses with spaces in them?
On 11/17/06, Dan Nelson [EMAIL PROTECTED] wrote:
In the last episode (Nov 17), John Kopanas said:
I have a text file
33 matches
Mail list logo