Re: Help trying to tune query that executes 40x slower than in SqlServer
От | Josh Berkus |
---|---|
Тема | Re: Help trying to tune query that executes 40x slower than in SqlServer |
Дата | |
Msg-id | 200503070928.47118.josh@agliodbs.com обсуждение исходный текст |
Ответ на | Help trying to tune query that executes 40x slower than in SqlServer (Hugo Ferreira <bytter@gmail.com>) |
Ответы |
Re: Help trying to tune query that executes 40x slower than in SqlServer
|
Список | pgsql-performance |
Hugo, > insert into MRS_REPLICATION_OUT select 514, 10000168, C.contxt_id, > C.contxt_elmt_ix, CAST(null as NUMERIC(18)), CAST(null as > NUMERIC(18)), CAST(null as NUMERIC(18)), CAST(null as NUMERIC(18)), > CAST(null as NUMERIC(18)), null, 1 from c2iedm.CONTXT as P inner join > c2iedm.CONTXT_ELMT as C on (P.contxt_id=C.contxt_id) inner join > MRS_REPLICATION_OUT as S on S.ent_id=10000029 and (CAST(P.contxt_id AS > numeric(18)) = S.pk1) inner join MRS_TRANSACTION TRANS on Can you *format* this query please, and re-submit it? Proper query format looks like: SELECT a.1, b.2 FROM a JOIN b ON a.1 = b.3 JOIN c ON b.4 = c.1 WHERE a.5 < 6 AND c.7 = '2005-01-01'; ... for maximum readability. Also, when asking others to help debug your queries, it helps them (and, frankly, you) if you can NOT use single-letter table aliases. Single-letter table aliases are evil for the same reason that single-letter variables in code are. Thanks! -- Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-performance по дате отправления: