Re: [GENERAL] many similar indexbased selects are extremely slow

2005-01-02 Thread Pierre-Frédéric Caillaud
select field1,field2,field3 from mytable where id=XX; For instance, on my machine : SELECT * FROM bigtable with 2M rows WHERE id IN (list of 500 values) takes 10 ms. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL

Re: [GENERAL] many similar indexbased selects are extremely slow

2005-01-02 Thread Pierre-Frédéric Caillaud
I use a bigger psql-table to store information and keep an id-value of how big ? each row in memory of my application for faster access. related to the previous question : are you sure there won't be a day where it won't fit ? My applications is able to calculate a list of needed id's in v

Re: [GENERAL] many similar indexbased selects are extremely slow

2005-01-01 Thread Jeff Davis
For what it's worth, I put 100k rows into a table in 8.0beta5, and selected 10k at a time. When doing each SELECT seperately using the index, it took about 2.5s to do 10k SELECTs. When using an IN query containing all the id's that I wanted, it took less than a second. Jeff On Sat, 2005-01-01 at

Re: [GENERAL] many similar indexbased selects are extremely slow

2005-01-01 Thread Jeff Davis
Well, first it would be a good idea to see what postgres is actually doing. Send the output of: => EXPLAIN ANALYZE SELECT OID FROM atrikelindex WHERE id_artikel=?; (where ? is replaced by some id value) It will either say index lookup or sequential scan since it's just a select from one table. T