Re: Improving performance on multicolumn query
От | Jan Kesten |
---|---|
Тема | Re: Improving performance on multicolumn query |
Дата | |
Msg-id | 43723257.5060804@web.de обсуждение исходный текст |
Ответ на | Re: Improving performance on multicolumn query ("Steinar H. Gunderson" <sgunderson@bigfoot.com>) |
Список | pgsql-performance |
Hi all! First thanks to any answer by now :-) > You don't post your table definitions (please do), but it looks like > test_b, test_c, test_d and test_e might be bigints? If so, you may > want to do explicit "AND test_b=1::bigint AND test_c=2::bigint" etc. > -- 7.4 doesn't figure this out for you. (8.0 and higher does.) I didn't post table defintion, but you all are right, test_a to test_e are all bigint. I use JDBC to connect to this database and use a prepared statment for the queries and set all parameters with pst.setLong() method. Perhaps this could be the problem? I'll try 'normal' statements with typecasting, because as far as I can see, the query is the problem (postgresql takes more than 98% cpu while running these statements) or the overhead produced (but not the network, as it has only 1-2% load). Quering other tables (not as big - both rows and columns are much less) run quite fast with the same code. So, thanks again - I'll try and report :-) Can't be so slow, I have some self-build database with millions of rows and they run very fast - but they don't use bigint ;-) Cheers, Jan
В списке pgsql-performance по дате отправления: