14560 items (1228 unread) in 26 feeds
Database
(1228 unread)
Execute query each time Elapsed: 5.65 seconds.
Oracle 11g result cache Elapsed: .30 seconds.
Isn't that just amazing and incredible and wonderful? Here's the original version of the function (over 5 seconds):
PACKAGE BODY emplu
IS
FUNCTION onerow (employee_id_in IN employees.employee_id%TYPE)
RETURN employees%ROWTYPE
IS
onerow_rec employees%ROWTYPE;
BEGIN
SELECT *
INTO onerow_rec
FROM employees
WHERE employee_id = employee_id_in;
RETURN onerow_rec;
END onerow;
END emplu;
and here's the result cache version:
PACKAGE BODY emplu
IS
FUNCTION onerow (employee_id_in IN employees.employee_id%TYPE)
RETURN employees%ROWTYPE
RESULT_CACHE RELIES_ON ( employees )
IS
onerow_rec employees%ROWTYPE;
BEGIN
SELECT *
INTO onerow_rec
FROM employees
WHERE employee_id = employee_id_in;
RETURN onerow_rec;
END onerow;
END emplu;
Can you see the difference? Not much of a change, right? I just added that single RESULT_CACHE line. And notice that I would not have to change any of the code that was already calling this function.
Here's the bottom line regarding the function result cache: get ready now to take advantage of this feature. Stop writing SELECT statements directly into your application code. Instead, hide your queries in functions so that you can easily convert to result caches when you upgrade to Oracle11g.
A world-wide race to arm rather than feed our citizens....
The Times, citing Defense Department sales data through the end of August, reported that countries newly reliant on the United States as a primary major weapons source included Argentina, Brazil, India, Iraq, Morocco and Pakistan and former Soviet republics Azerbaijan and Georgia.
Together the countries signed $870 million worth of arms deals with the Bush administration from 2001 to 2004, but in the past four fiscal years the total had increased to $13.8 billion.
From $870M to $13.8B! Fortunately they are going to the most stable and democratic of nations, so we don't have to worry that someday some of these weapons might be used to kill our own citizens.
Seems like George W (or, to put a finer point on it, Dick "Watch Your Head" Cheney) is making sure that all of his friends in the military-industrial complex will be taking dumps in solid gold bathroom fixtures for the rest of their unnatural lives.
By JOHN PORRETTO, AP Business Writer Fri Aug 1, 5:11 PM ET
HOUSTON - Oil giants Chevron Corp. and Total SA wrapped up a string of gargantuan, record-breaking earnings reports Friday, a stretch in which six of the major international oil companies topped $50 billion in combined profit for the first time.
While the profits of unparalleled size have brought withering criticism from Washington and disgust from consumers across the country, very few were surprised. Crude prices during the second quarter were nearly double what they were a year ago.
====================================================
It is getting so so hard to even pretend that we live in a democracy. In what sort of democracy do its citizens allow corporations to suck us dry as they repeat the mantra of "supply and demand"? In what sort of democracy does its citizens allow a runaway, renegade, ultra-right government (which admits to hating government and wanting to privatize all) take all our tax dollars and hand them over to banks, financial "services" companies, military-industrial wacko companies like Blackwater - either when they actually blow it so badly they fail or pay off our legislators to hand them big fat no-bid contracts?
The US is not a democracy. It is a plutocracy, with manic edges of theocracy. And it is wearing me down.
I say: start doing some worse case planning.
What are you going to do with they start charging for air?
What are you going to do when the infrastructure of the country collapses (bridges, roads, etc.) and while they continue to pour our tax dollars down black holes of the War Against Extremism, they raise our taxes to theoretically repair that infrastructure (but then another suicide bombing requires another war - sorry, no infrastructure)?
What are you going to do when gas hits $10 a gallon?
If you don't plan for it now, you will be screwed, totally screwed, very soon.
And that is my mid-summer rant. See ya....
Consumers boosted their borrowing in May, mostly reflecting heavy credit card use to finance their purchases.
The Federal Reserve reported Tuesday that consumer credit increased at an annual rate of 3.6 percent in May, roughly the same pace as logged in the prior month.
The pickup pushed total consumer debt up by $7.78 billion, to $2.57 trillion.
The increase was led by much stronger demand for revolving credit, which is primarily credit cards. Use of revolving credit rose at a 7.1 percent pace in May, a month in which a flow of tax rebates helped to energize consumer spending. In April consumers cut back on such credit at a 0.5 percent pace.
Still, the longer-term trend shows that consumers have been charging more of their purchases on credit cards as banks have tightened lending standards on other types of loans.
"Consumer spending was so large in May that consumers used their income tax rebate checks and brought out the plastic as well," said Chris Rupkey, chief financial economist at Bank of Tokyo-Mitsubishi in New York. "This double-dipping approach cannot keep the consumer afloat forever."
Demand for non-revolving credit used to finance cars, education and other things, meanwhile, slowed to a 1.6 percent increase in May. That was down from a growth rate of 6.1 percent in April and was the slowest since December.
Overall, revolving debt jumped $5.69 billion during May and non-revolving debt increased $2.09 billion.
The Fed's measure of consumer borrowing does not include any debt secured by real estate, such as mortgage or home equity loans.
Consumer spending accounts for more than two-thirds of economic activity.