Thread: help needed asap....

help needed asap....

From
"Phadnis"
Date:

 
Hi.

I am new to postgres and i need help from u.i hope i get positive response.. though my questions mite seem silly to u...

iam working on postgres.. i have around 1 lakh records in almost 12 tables..
1 ) when i try to query for count or for any thg it takes a long time to return the result. How to avoid this

2) also i want to know how to increase the  performance..( i do vacuum once in a day)

3) apart from that iam connecting to it through asp.net.. so when i try to fetch rcords the connection breaks..
how to avoid this..(very immp)

4) also in the tables  i put a column -- serial id . so when i try to insert new records after deleting the records(lets say at that time the last sequence number was 100).. when i insert new record it will start with 101..
suppose the sequence number reaches its maximum limit can i use the previous 1-100 values, by using the cycled option.

Thks..






Re: help needed asap....

From
"Matthew Nuzum"
Date:
On 12 Mar 2006 11:46:25 -0000, Phadnis <shphadnis@rediffmail.com> wrote:
>  Hi.
>
>  I am new to postgres and i need help from u.i hope i get positive response.. though my questions mite seem silly to
u...
>
>  iam working on postgres.. i have around 1 lakh records in almost 12 tables..
>  1 ) when i try to query for count or for any thg it takes a long time to return the result. How to avoid this
>
>  2) also i want to know how to increase the  performance..( i do vacuum once in a day)
>

These two questions are applicable to this list... your other
questions may get quicker responses on the users list.

However, you haven't provided enough information for anyone here to
help. Here's what you should do:

Find queries that you think should be faster than they are. For
example, if your query is "Select count(*) from foo" you can get
important performance information about the query by running:
EXPLAIN ANALYZE select count(*) from foo

Send the details of the query, including the output from the explain
analyze output (which looks pretty meaningless until you've learned
what to look for) to the list with a detailed question.

Also, for general performance hints, tell the list what your setup is,
what items you've tweaked (and maybe why).

Generally, be as generous with your details as you can. Also, have you
googled around for hints? Here's a good website with information:
http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php
Notice there's a section on performance tips.

Also, this list works because volunteers who have knowledge and free
time choose to help  when they can. If you really need answers ASAP,
there are a few organizations who provide paid support.

--
Matthew Nuzum
www.bearfruit.org

Re: help needed asap....

From
Bruno Wolff III
Date:
On Sun, Mar 12, 2006 at 11:46:25 -0000,
  Phadnis <shphadnis@rediffmail.com> wrote:
>   
> 1 ) when i try to query for count or for any thg it takes a long time to return the result. How to avoid this

Postgres doesn't cache counts, so if you are counting a lot of records, this
may take a while to run. If you do a lot of counts or need them to be fast
even if it slows other things down, there are some things you can do to address
this. Several strategies have been repeatedly discussed in the archives.