Greg,
Please don't confuse the issue by throwing Max() and Count() into the same
basket.
When on earth is that post of mine from? Seems like it's several months, if
not a couple of years, old.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
---(end of
Josh Berkus [EMAIL PROTECTED] writes:
Max() and Count() cannot use indexes for technical reasons. Browse through
the archives of SQL, PERFORM, and HACKERS for about 12,000 discussions on the
subject.
Please don't confuse the issue by throwing Max() and Count() into the same
basket.
The
Thanks Josh and Ian,
narrowing the problem down. The reallyslow
line is the one where I try and remove potential duplicates. It does not look at
the indexes.
Point on using copy rather than insert is taken. I
use copy to load to a temp file so I can test the data and alter certain values.
On Thu, Feb 05, 2004 at 15:53:08 +0800,
Richard Sydney-Smith [EMAIL PROTECTED] wrote:
Trial Solutions:
1) delete from fsechist where hist_q in (select hist_q from fsechist,
temp_shareprices where hist_tick = ticker and dte = hist_date);
Don't you want:
delete from fsechist where hist_q in
Ihave a procedure ( included below with table
definition) to import end of day quotes into a table fsechist.
The issue is with the speed ( or lackof it) that
the procedure proceeds. Apparently it is the subselects that are the worst issue
and I have tried to replace these. Also max() and
Richard,
The issue is with the speed ( or lackof it) that the procedure proceeds.
Apparently it is the subselects that are the worst issue and I have tried to
replace these. Also max() and count() refuse to use indexes.
Max() and Count() cannot use indexes for technical reasons. Browse
, 2004
10:48 AM
Subject: [SQL] Slow sub-selects,
max and count(*)
Ihave a procedure ( included below with
table definition) to import end of day quotes into a table
fsechist.
The issue is with the speed ( or lackof it) that
the procedure proceeds. Apparently it is the subs