|
Issue with NOT IN in Firebird 3
|
|||
---|---|---|---|
#18+
Ivan_Pisarevsky, Код: sql 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22.
I tried to replace SELECT 1 FROM INVOICES where INVOICES.ORDERNO = SHIPPING.ORDERNO with SELECT 1 FROM INVOICES JOIN SHIPPING ON INVOICES.ORDERNO = SHIPPING.ORDERNO but result not the same even runs faster ... |
|||
:
Нравится:
Не нравится:
|
|||
31.08.2017, 21:50 |
|
Issue with NOT IN in Firebird 3
|
|||
---|---|---|---|
#18+
Гаджимурадов РустамСПМ> железный закон проектировщика - то, что мы считаем, СПМ> должно быть целого типа, то, что мереям - плавающего. Замечательно сформулировано. Надо выбить в камне. На самом деле формулировка не моя. Я это считал всегда само собой разумеющимся, формулировать нужды не было. Запомнил именно как отличную формулировку, прочитав от Елены на яху лет 15 назад. Кстати, я очень рад, что она и жива и всё ещё в строю. Мы много с ней трещали за жизнь в аське, когда я прощался, она сказала - а я вот никогда не сдамся. Замечательная женщина. ... |
|||
:
Нравится:
Не нравится:
|
|||
31.08.2017, 22:44 |
|
Issue with NOT IN in Firebird 3
|
|||
---|---|---|---|
#18+
FredFF, попробуй Код: sql 1.
или Код: sql 1.
... |
|||
:
Нравится:
Не нравится:
|
|||
31.08.2017, 23:04 |
|
Issue with NOT IN in Firebird 3
|
|||
---|---|---|---|
#18+
Симонов Денис, Thanks Denis very much! After I added the indexes procedure runs like a charm - 1-2 sec! I think Firebird 3 documentation should mention that EXISTS predicate requires to have indexes on fields. IN predicate is not using indexes that's why it's very slow. You are saver of the day! Thank you very much, Fred ... |
|||
:
Нравится:
Не нравится:
|
|||
01.09.2017, 00:46 |
|
Issue with NOT IN in Firebird 3
|
|||
---|---|---|---|
#18+
FredFFСимонов Денис, Thanks Denis very much! After I added the indexes procedure runs like a charm - 1-2 sec! I think Firebird 3 documentation should mention that EXISTS predicate requires to have indexes on fields. IN predicate is not using indexes that's why it's very slow. You are saver of the day! Thank you very much, Fred Nor Exist neither In reqiures indexes. They are requred just by common sense. Imagine you, not server, search records. What will be easy for YOU - find them by 1-2 iterations or scan all table? Multiple this efforts on amount of records in master table and you will be fantastically surprised. IN is a little bit slow because it lifts new instance of index for each element in the list of arguments. ... |
|||
:
Нравится:
Не нравится:
|
|||
01.09.2017, 01:10 |
|
Issue with NOT IN in Firebird 3
|
|||
---|---|---|---|
#18+
There was a greate question: FredFFFB 3 is not optimized for NOT IN queries at all! But result is so small: not enough indexes. I'm glad to see a positive result. :) Read about "float" and "union". And what different between "union" and "union all", it is strongly recommended. ... |
|||
:
Нравится:
Не нравится:
|
|||
01.09.2017, 09:28 |
|
|
start [/forum/topic.php?fid=40&startmsg=39513709&tid=1561448]: |
0ms |
get settings: |
11ms |
get forum list: |
16ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
84ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
54ms |
get tp. blocked users: |
2ms |
others: | 17ms |
total: | 206ms |
0 / 0 |