post - новости с полем type связанным с таблицей post_type по id
post_type - тип новости с 2 полями (id и name|type)
post_images - картинки ко всем типам постов что выше
post_news_options - доп опции для тех постов что выше (тут какие то доп поля, которые носят не основной характер)
post_category - категории
project - проекты
persons - персоны
settings - настройки сайта
bismoney: количество постов не "влияют" на быстроту выборки. Правильные типы полей и индексы будут приносить больше производительности.
Если посты имеют одну смысловую нагрузку, то и держать их логично в одной таблице, а не разводить кучу таблиц. В таблице использовать поле индикатор с типом поста.
В выборке делать запрос по типу поста и выводить нужные поля.
Приведу к примеру таблицу с товарами супермаркета, где куча разновидностей товара.
Таблица товаров будет одна, а вот характиристики будут уже связанны с другими таблицами. Это логично.
А вот заводить отдельную таблицу для каждого типа товара - не логично.
[ Context 'ael-dundi-e164-canonical' created by 'pbx_ael' ]
[ Context 'ael-dundi-e164-customers' created by 'pbx_ael' ]
[ Context 'ael-dundi-e164-via-pstn' created by 'pbx_ael' ]
[ Context 'ael-dundi-e164-local' created by 'pbx_ael' ]
Include => 'ael-dundi-e164-canonical' [pbx_ael]
Include => 'ael-dundi-e164-customers' [pbx_ael]
Include => 'ael-dundi-e164-via-pstn' [pbx_ael]
[ Context 'ael-dundi-e164-switch' created by 'pbx_ael' ]
Alt. Switch => 'DUNDi/e164' [pbx_ael]
[ Context 'ael-dundi-e164-lookup' created by 'pbx_ael' ]
Include => 'ael-dundi-e164-local' [pbx_ael]
Include => 'ael-dundi-e164-switch' [pbx_ael]
[ Context 'ael-dundi-e164' created by 'pbx_ael' ]
'~~s~~' => 1. MSet(LOCAL(exten)=${ARG1}) [pbx_ael]
2. Goto(${exten},1) [pbx_ael]
3. Return() [pbx_ael]
Include => 'ael-builtin-h-bubble' [pbx_ael]
[ Context 'ael-iaxtel700' created by 'pbx_ael' ]
'_91700XXXXXXX' => 1. Dial(IAX2/${IAXINFO-AEL}@iaxtel.com/${EXTEN:1}@iaxtel) [pbx_ael]
[ Context 'ael-iaxprovider' created by 'pbx_ael' ]
[ Context 'ael-trunkint' created by 'pbx_ael' ]
'_9011.' => 1. Gosub(ael-dundi-e164,~~s~~,1(${EXTEN:4})) [pbx_ael]
2. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
Include => 'ael-dundi-e164-lookup' [pbx_ael]
[ Context 'ael-trunkld' created by 'pbx_ael' ]
'_91NXXNXXXXXX' => 1. Gosub(ael-dundi-e164,~~s~~,1(${EXTEN:1})) [pbx_ael]
2. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
Include => 'ael-dundi-e164-lookup' [pbx_ael]
[ Context 'ael-trunklocal' created by 'pbx_ael' ]
'_9NXXXXXX' => 1. Dial(${OUTBOUND-TRUNK}/${EXTEN:${OUTBOUND-TRUNKMSD}}) [pbx_ael]
[ Context 'ael-international' created by 'pbx_ael' ]
Include => 'ael-longdistance' [pbx_ael]
Include => 'ael-trunkint' [pbx_ael]
Ignore pattern => '9' [pbx_ael]
[ Context 'ael-longdistance' created by 'pbx_ael' ]
Include => 'ael-local' [pbx_ael]
Include => 'ael-trunkld' [pbx_ael]
Ignore pattern => '9' [pbx_ael]
[ Context 'ael-local' created by 'pbx_ael' ]
Include => 'ael-default' [pbx_ael]
Include => 'ael-trunklocal' [pbx_ael]
Include => 'ael-iaxtel700' [pbx_ael]
Include => 'ael-trunktollfree' [pbx_ael]
Include => 'ael-iaxprovider' [pbx_ael]
Ignore pattern => '9' [pbx_ael]
[ Context 'DLPN_loopS' created by 'pbx_config' ]
Include => 'default' [pbx_config]
Include => 'parkedcalls' [pbx_config]
Include => 'conferences' [pbx_config]
Include => 'ringgroups' [pbx_config]
Include => 'voicemenus' [pbx_config]
Include => 'queues' [pbx_config]
Include => 'voicemailgroups' [pbx_config]
Include => 'directory' [pbx_config]
Include => 'pagegroups' [pbx_config]
Include => 'page_an_extension' [pbx_config]
[ Context 'DLPN_Redcom' created by 'pbx_config' ]
Include => 'CallingRule_475951' [pbx_config]
Include => 'CallingRule_475950' [pbx_config]
Include => 'default' [pbx_config]
Include => 'parkedcalls' [pbx_config]
Include => 'conferences' [pbx_config]
Include => 'ringgroups' [pbx_config]
Include => 'voicemenus' [pbx_config]
Include => 'queues' [pbx_config]
Include => 'voicemailgroups' [pbx_config]
Include => 'directory' [pbx_config]
Include => 'pagegroups' [pbx_config]
Include => 'page_an_extension' [pbx_config]
[ Context 'CallingRule_475950' created by 'pbx_config' ]
'_XXXXXX' => 1. Macro(trunkdial-failover-0.3,${trunk_1}/${EXTEN:0},${trunk_2}/${EXTEN:0},trunk_1,trunk_2,475950) [pbx_config]
[ Context 'CallingRule_475951' created by 'pbx_config' ]
'_8XXXXXXXXXX' => 1. Macro(trunkdial-failover-0.3,${trunk_2}/${EXTEN:0},${trunk_1}/${EXTEN:0},trunk_2,trunk_1,475951) [pbx_config]
[ Context 'DID_trunk_2_default' created by 'pbx_config' ]
[ Context 'DID_trunk_2' created by 'pbx_config' ]
Include => 'DID_trunk_2_timeinterval_all,*,mon-sun,*,*' [pbx_config]
Include => 'DID_trunk_2_default' [pbx_config]
[ Context 'DID_trunk_1_default' created by 'pbx_config' ]
[ Context 'DID_trunk_1' created by 'pbx_config' ]
Include => 'DID_trunk_1_timeinterval_all,*,mon-sun,*,*' [pbx_config]
Include => 'DID_trunk_1_default' [pbx_config]
[ Context 'macro-q_logout' created by 'pbx_config' ]
's' => 1. Verbose(2, Logged ${thisActiveMember} out of ${thisQueue} queue) [pbx_config]
2. RemoveQueueMember(${thisQueue},${thisActiveMember}) [pbx_config]
3. Playback(silence/1) [pbx_config]
4. ExecIf($["${RQMSTATUS}" = "REMOVED"]?Playback(agent-loggedoff):Playback(an-error-has-occurred)) [pbx_config]
[ Context 'macro-q_login' created by 'pbx_config' ]
's' => 1. Verbose(2, Logging ${thisActiveMember} into the ${thisQueue} queue) [pbx_config]
2. AddQueueMember(${thisQueue},${thisActiveMember}) [pbx_config]
3. Playback(silence/1) [pbx_config]
4. ExecIf($["${AQMSTATUS}" = "ADDED"]?Playback(agent-loginok):Playback(an-error-has-occurred)) [pbx_config]
[ Context 'macro-member-loginlogout' created by 'pbx_config' ]
's' => 1. Verbose(2, Logging queue member in or out of the request queue) [pbx_config]
2. Set(thisQueue=${thisQueueXtn}) [pbx_config]
3. Set(queueMembers=${QUEUE_MEMBER_LIST(${thisQueue})}) [pbx_config]
4. Set(field=1) [pbx_config]
5. Set(logged_in=0) [pbx_config]
6. Set(thisQueueMember=${CUT(queueMembers,\,,${field})}) [pbx_config]
7. While($[${EXISTS(${thisQueueMember})}]) [pbx_config]
8. GotoIf($["${thisQueueMember}" != "${thisActiveMember}"]?check_next) [pbx_config]
9. Set(logged_in=1) [pbx_config]
10. ExitWhile() [pbx_config]
[check_next] 11. Set(field=$[${field} + 1]) [pbx_config]
12. Set(thisQueueMember=${CUT(queueMembers,\,,${field})}) [pbx_config]
13. EndWhile() [pbx_config]
14. MacroIf($[${logged_in} = 0]?q_login:q_logout) [pbx_config]
[ Context 'queue-member-manager' created by 'pbx_config' ]
'handle_member' => 1. Verbose(2, Looping through queues to log in or out queue members) [pbx_config]
2. Set(thisActiveMember=${CHANNEL(channeltype)}/${CHANNEL(peername)}) [pbx_config]
3. Set(queue_field=2) [pbx_config]
4. Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})}) [pbx_config]
5. While($[${EXISTS(${thisQueueXtn})}]) [pbx_config]
6. Macro(member-loginlogout) [pbx_config]
7. Set(queue_field=$[${queue_field} + 1]) [pbx_config]
8. Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})}) [pbx_config]
9. EndWhile() [pbx_config]
[ Context 'local' created by 'pbx_config' ]
Include => 'default' [pbx_config]
Include => 'trunklocal' [pbx_config]
Include => 'iaxtel700' [pbx_config]
Include => 'trunktollfree' [pbx_config]
Include => 'iaxprovider' [pbx_config]
Include => 'parkedcalls' [pbx_config]
Ignore pattern => '9' [pbx_config]
[ Context 'longdistance' created by 'pbx_config' ]
Include => 'local' [pbx_config]
Include => 'trunkld' [pbx_config]
Ignore pattern => '9' [pbx_config]
[ Context 'international' created by 'pbx_config' ]
Include => 'longdistance' [pbx_config]
Include => 'trunkint' [pbx_config]
Ignore pattern => '9' [pbx_config]
[ Context 'trunklocal' created by 'pbx_config' ]
'_9NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]
[ Context 'trunkld' created by 'pbx_config' ]
'_91NXXNXXXXXX' => 1. Macro(dundi-e164,${EXTEN:1}) [pbx_config]
2. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config]
[ Context 'trunkint' created by 'pbx_config' ]
'_9011.' => 1. Macro(dundi-e164,${EXTEN:4}) [pbx_config]
2. Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})}) [pbx_config]
[ Context 'iaxprovider' created by 'pbx_config' ]
[ Context 'iaxtel700' created by 'pbx_config' ]
'_91700XXXXXXX' => 1. Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel) [pbx_config]
[ Context 'macro-dundi-e164' created by 'pbx_config' ]
's' => 1. Goto(${ARG1},1) [pbx_config]
Include => 'dundi-e164-lookup' [pbx_config]
[ Context 'dundi-e164-lookup' created by 'pbx_config' ]
Include => 'dundi-e164-local' [pbx_config]
Include => 'dundi-e164-switch' [pbx_config]
[ Context 'dundi-e164-switch' created by 'pbx_config' ]
Alt. Switch => 'DUNDi/e164' [pbx_config]
[ Context 'dundi-e164-local' created by 'pbx_config' ]
Include => 'dundi-e164-canonical' [pbx_config]
Include => 'dundi-e164-customers' [pbx_config]
Include => 'dundi-e164-via-pstn' [pbx_config]
[ Context 'dundi-e164-via-pstn' created by 'pbx_config' ]
[ Context 'dundi-e164-customers' created by 'pbx_config' ]
[ Context 'dundi-e164-canonical' created by 'pbx_config' ]
-= 159 extensions (376 priorities) in 79 contexts. =-
лог звонка с 100 на 111
<------------>
-- Executing [111@DLPN_Redcom:1] Gosub("SIP/100-00000017", "111,stdexten(SIP/111)") in new stack
[Jun 26 07:51:09] NOTICE[1770][C-0000006b]: pbx.c:4911 pbx_extension_helper: No such label 'stdexten' in extension '111' in context 'DLPN_Redcom'
[Jun 26 07:51:09] WARNING[1770][C-0000006b]: pbx.c:12202 pbx_parseable_goto: Priority 'stdexten' must be a number > 0, or valid label
[Jun 26 07:51:09] ERROR[1770][C-0000006b]: app_stack.c:575 gosub_exec: Gosub address is invalid: '111,stdexten(SIP/111)'
== Spawn extension (DLPN_Redcom, 111, 1) exited non-zero on 'SIP/100-00000017'