Re: [PERFORM] Slow SQL query (14-15 seconds)

2008-11-13 Thread Tomasz Myrta
eplaced with subselects: select (select count(*)... ) as societe_nbre_commandes from societes ... -- Regards, Tomasz Myrta -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

[PERFORM] full text search - dictionary caching

2009-02-25 Thread Tomasz Myrta
Hello Does Postgres have ability to keep .dict and .affix files cached globally for all client sessions? Every time I connect to test server - it takes 3 seconds to load 4MB dictionary when executing first FTS query. -- Regards, Tomasz Myrta -- Sent via pgsql-performance mailing list

Re: [PERFORM] Indexing question

2003-08-29 Thread Tomasz Myrta
yourself - what do you have in "where" clause? Example: create index some_index on your_table(id_field) where not deleted; Regards, Tomasz Myrta ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [PERFORM] Indexing question

2003-08-29 Thread Tomasz Myrta
is null which doesn't make too much sense. Check your queries. You probably have something like this: select * from tablename where not deleted and xxx Create your index to match xxx clause - if xxx is "some_id=13", then create your index as: create index on tablename(some_id)

Re: [PERFORM] Indexing question

2003-08-29 Thread Tomasz Myrta
primary key this way, right? It looks much better now. I'm not sure about the second index. Probably it will be useless, because you sort ALL records with deleteddtata is null. Maybe the first index will be enough. I'm not sure what to do with doubled index on a primary key

Re: [PERFORM] Index problem

2003-09-24 Thread Tomasz Myrta
sing that index But following query (notice there are less id-s in WHERE clause, but rest is same) select "REO_ID", "END_DATE" from "PRIORITY_STATISTICS" where "REO_ID" IN ('112851' ,'112859' ,'112871' ,'112883' ,&#

Re: [PERFORM] count(*) slow on large tables

2003-10-02 Thread Tomasz Myrta
nd 60 Megs and goes through it, which it could do in a fraction of the time. Dror Just like other aggregate functions, count(*) won't use indexes when counting whole table. Regards, Tomasz Myrta ---(end of broadcast)--- TIP 1: subscribe and u

Re: [PERFORM] Is This My Speed Limit?

2003-10-02 Thread Tomasz Myrta
58) (actual > time=135.87..1113.69 rows=9912 loops=1) Well, it looks like a speed limit. I wouldn't expect better speed for queries returning 1 rows. Regards, Tomasz Myrta ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [PERFORM] planner doesn't use multicolumn index

2003-10-08 Thread Tomasz Myrta
on of the index. Any idea? thanks. Adrián where partido=99::int2 and partida=123; Regards, Tomasz Myrta ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [PERFORM] Measuring execution time for sql called from PL/pgSQL

2003-12-12 Thread Tomasz Myrta
time function, which can be used for performance tests is timeofday(). You can read more about time functions in manual. Regards, Tomasz Myrta ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [PERFORM] "select max/count(id)" not using index

2003-12-22 Thread Tomasz Myrta
#x27;select count(id)' Yes, this is normal. Because of MVCC all rows must be checked and Postgres doesn't cache count(*) like Mysql. 'select max(id)' This is also normal, but try to change this query into: select id from some_table order by id desc limit 1;

Re: [PERFORM] Queries with timestamp II

2004-01-26 Thread Tomasz Myrta
y is not using the index. Anybody knows what I'm doing wrong? Over 25000 rows match your condition: timestamp_in < to_timestamp( '20031201', 'MMDD' ); How many rows do you have in your table? It's possible, that seq scan is just faster than us

Re: [PERFORM] "Overlaping" indexes

2004-02-02 Thread Tomasz Myrta
rhead with managing indexes. The second (2 columns) index is useless - it's function is well done by the first one (3 columns). Regards, Tomasz Myrta ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriat

Re: [PERFORM] "Overlaping" indexes

2004-02-02 Thread Tomasz Myrta
Dnia 2004-02-02 19:30, Użytkownik scott.marlowe napisał: Not entirely, since it only has to sort two columns, it will be smaller, and will therefore be somewhat faster. Can you say something more about it? Will it be enough faster to keep them both? Did anyone make such tests? Regards, Tomasz

Re: [PERFORM] cacheable stored functions?

2004-02-20 Thread Tomasz Myrta
;IMMUTABLE" You can read more about immutable, stable and volatile functions in Postgresql documentation - chapter SQL Commands/CREATE FUNCTION. Regards, Tomasz Myrta ---(end of broadcast)--- TIP 6: Have you searched our list arc