Results 1 to 8 of 8
Thread: A small Question
- 08-26-2008, 08:17 AM #1Senior Member
- Join Date
- May 2008
- Makati, Philippines
- Rep Power
A small Question
Does anyone know how can i improve the speed of retrieving a result set from a query?
Here is my scenario, Im using Java as my front end. In small scale to medium scale(around 100K rows in DB) database it works OK. But the problem is when im fetching a specific column in a huge database. Example im going to get all calls of a telephone specific number for the previous month. Ot took me around 2 hours just to get that data. The Database is Gigantic, it contains all calls of all telephone numbers of our company's subscribers. it s like a whole country, our database warehouse only contains the last 3 months of those records. Can anyone had a idea to speed it up a little.
What im doing is fetching the record they want to rebill and fixed the problem, My program fetches that record and i have my own database where the user can save that fetch records and store it. so that there would only be 1 connection per record, if that record exist locally it would retrieve the local copy. I hope someone migth give me an idea =PMind only knows what lies near the heart, it alone sees the depth of the soul.
- 08-26-2008, 09:38 AM #2
I'm not clever with DBMS. But most of developers talking about data partitioning. Kind of a partitioning on a database and work on them. Did you know about that more?
- 08-28-2008, 06:58 PM #3
- 08-30-2008, 04:03 PM #4
- 08-31-2008, 04:44 PM #5
I'm talking about something like:
create index my_table_phone_number on my_table(phone_number)
- 08-31-2008, 07:05 PM #6
Hey ProjectKaiser, what's the use of it even need to retrieve large number of data. How can be this is helpful on that? I'm asking this, because I'm not much familiar with DB related development and I want to learn something on this. :)
- 09-01-2008, 06:54 AM #7
So by using an index on the "phone_number" field, and doing an equals search, you are eliminating millions of records that don't match. Thus you only have to search through the records for the calls you made.
A select using something like
select * from bigcallrecordtable where phone_number = "201 555-1212" is massively faster with an index than without.
If you don't work in the DBMS space, you probably should let someone who does answer the questions.
And OP, your thread title leaves a lot to be desired. Better titles are likely to get more responses.
The OP doesn't talk about how many tables are being joined, how many fields are being searches, whether or not a "like" verb is being used, etc.
DBMS query optimization is a wide open topic, there are lots of books on it, and there are PhD dissertations yet to be written
- 09-01-2008, 07:10 AM #8
- By karingulanagaraj in forum New To JavaReplies: 7Last Post: 08-11-2008, 05:11 AM
- By ayoood in forum New To JavaReplies: 2Last Post: 06-06-2008, 01:27 PM
- By ayoood in forum New To JavaReplies: 23Last Post: 05-27-2008, 01:18 PM
- By jimJohnson in forum New To JavaReplies: 6Last Post: 04-25-2008, 09:28 AM
- By diego in forum New To JavaReplies: 1Last Post: 12-02-2007, 02:32 AM