Re: Database design issue
- From: Babu Kalakrishnan <k.a.l.a@xxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 00:38:37 +0530
shaji.cc@xxxxxxxxx wrote:
A report has to be generated for this table. Catch is that, who ever is generating the report wants to see the amount in his own currency (otherwise he cant total the amount). So at the time of report generation, for each row, it has to calculate the FX rates for that amount. This creates huge performance problem.
Introducing 2 or 3 columns more and storing amounts in diffrent currencies was the first idea came to my mind. But this doesnt scale well.
That's obviously a baaaaad idea.
I don't see why having to do the conversion on the fly is such a big performance issue. I wouldn't expect more than say a couple of hundred entries in the Currency conversion table which you could read into a memory cache at the start of your report - unlikely to take you more than say 10 to 20 msecs with any decent database - and performing the conversion using an in-memory table will probably cost you very very little in terms of time.
On the other hand, if you're trying to read the conversion table from the database for every user record, THAT may be an issue. Each database access costs time - so you'd certainly want to avoid that if your number of user records is large.
BK
.
- Follow-Ups:
- Re: Database design issue
- From: shaji
- Re: Database design issue
- References:
- Database design issue
- From: shaji . cc
- Database design issue
- Prev by Date: Re: Bug in Oracle org.w3c.dom.Node ?
- Next by Date: Re: Database design issue
- Previous by thread: Database design issue
- Next by thread: Re: Database design issue
- Index(es):
Relevant Pages
|