| From: | Rudi Starcevic <rudi(at)oasis(dot)net(dot)au> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Analyze + Index |
| Date: | 2002-11-29 04:04:17 |
| Message-ID: | 3DE6E741.3010406@oasis.net.au |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Hi,
Say I have a table of 3000 user's,
Before I insert another user I need to check if that user is already in
there, so I have a 3 column index on a table ( phone,lastname,firstname ).
First I check for the user using the index if they are not in there I
then add an new user so I now have 3001.
For my next user I then check again using the same procedure.
Is the following correct ?
As I have not yet Analyzed the db my index is still 3000 rows and my
user table is 3001.
If I add another user my index is still 3000 and my table 3002.
So I either analyze after each insert or use a seqential scan.
I wonder this as I have a csv file of users to bulk insert each day.
Typically I'll have a file of 1500 or so users to add or append data to.
Thanks.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rudi Starcevic | 2002-11-29 04:45:11 | Re: Analyze + Index |
| Previous Message | Christoph Haller | 2002-11-28 16:14:06 | Re: retrieving specific info. from one column and locating it in another |