SELECT
a.attnum,
n.nspname,
c.relname,
a.attname AS colname,
t.typname AS type,
a.atttypmod,
FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,
pg_get_expr(d.adbin, d.adrelid) AS default_value, --d.adsrc AS default_value,
a.attnotnull AS notnull,
a.attlen AS length,
co.contype,
ARRAY_TO_STRING(co.conkey, ',') AS conkey
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
JOIN pg_type AS t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid
AND a.attnum = ANY(co.conkey) AND co.contype = 'p')
LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND c.relname = 'specs' AND n.nspname = 'boutique' ORDER BY a.attnum
0.0010879039764404
Array
(
)
SELECT "specs".* FROM "boutique"."specs" WHERE ((("specs"."id" = 116)))
0.13834285736084
Array
(
)
SELECT DISTINCT works.uid
FROM contest_works AS works
LEFT JOIN contest_projects AS projects ON projects.id = works.pid
WHERE works.status = 1
AND ( projects.status = 4 OR projects.status = 10)
0.0021588802337646
Array
(
)
SELECT DISTINCT "contest_winners"."uid" FROM "contest_winners"
0.03513503074646
Array
(
)
SELECT DISTINCT uid
FROM
(
-- пользователи у кого есть типовые услуги и аватара икупле на аккаунт или размещение
SELECT srv.uid AS uid
FROM service_kit AS srv
LEFT JOIN accounts AS acc ON acc.id = srv.uid
-- LEFT JOIN user_specs AS uspec ON srv.uid = uspec.uid AND uspec.is_primary IS TRUE
LEFT JOIN shop_pro_account_bind AS pro_bind ON pro_bind.uid = srv.uid
LEFT JOIN shop_servicekit_pinfront_bind AS pin_bind ON pin_bind.uid = srv.uid
LEFT JOIN shop_avatar_place_bind AS avatar_bind ON avatar_bind.uid = srv.uid
WHERE
acc.status = 2 AND acc.avatar IS NOT NULL -- есть аватара
AND srv.published IS TRUE AND srv.deleted IS NULL -- есть типовые услуги
AND
(
avatar_bind.bind_to > NOW() OR pin_bind.pinfront_to > NOW() OR pro_bind.pro_to > NOW() -- есть PRO или автара на главной или услуга на глагне
OR srv.uid IN(11,31,37,48,49,69,70,71,72,82,83,84,85,87,90,91,92,93,96,101,114,115,116,117,118,119,120,121,129,300018,300051,300066,300067,300068,300070,300071,300072,300073,300075,300076,300079,300084,300085,300087,300088,300091,300093,300096,300098,300099,300101,300103,300105,300108,300109,300112,300114,300116,300117,300124,300127,300128,300134,300135,300138,300141,300142,300144,300146,300147,300148,300150,300152,300154,300155,300159,300161,300166,300167,300173,300179,300183,300187,300188,300189,300190,300193,300195,300196,300198,300199,300203,300206,300208,300210,300212,300214,300216,300220,300221,300224,300227,300228,300229,300237,300240,300241,300255,300256,300257,300259,300260,300263,300266,300267,300269,300272,300276,300278,300281,300283,300292,300297,300298,300307,300308,300312,300314,300319,300320,300325,300326,300329,300331,300335,300336,300338,300339,300340,300341,300347,300349,300354,300355,300356,300357,300358,300362,300365,300367,300368,300372,300377,300378,300380,300381,300387,300390,300393,300394,300395,300398,300401,300402,300404,300408,300414,300415,300425,300449,300450,300451,300452,300470,300476,300479,300501,300505,300511,300526,300528,300554,300560,300563,300565,300589,300590,300659,300666,300683,300711,300758,300763,300766,300767,300777,300780,300802,300816,300823,300849,300859,300860,300865,300867,300879,300923,300926,300938,300961,301023,301037,301040,301050,301055,301068,301077,301086,301088,301103,301115,301141,301149,301150,301160,301161,301162,301163,301166,301176,301180,301184,301189,301197,301198,301206,301224,301229,301281,301297,301309,301316,301319,301323,301332,301341,301352,301359,301374,301393,301403,301408,301414,301460,301492,301505,301527,301533,301552,301558,301572,301578,301591,301621,301624,301631,301645,301649,301650,301661,301672,301675,301678,301681,301686,301695,301698,301706,301708,301729,301730,301732,301749,301752,301753,301763,301769,301781,301783,301784,301788,301793,301815,301881,301883,301891,301902,301916,301919,301929,301953,301959,301970,302010,302031,302048,302051,302057,302063,302069,302094,302105,302115,302144,302163,302215,302261,302265,302282,302293,302307,302325,302329,302330,302340,302343,302346,302361,302366,302377,302378,302390,302413,302415,302423,302426,302433,302437,302443,302454,302458,302460,302461,302483,302489,302495,302502,302507,302556,302560,302586,302596,302618,302656,302662,302671,302674,302708,302724,302727,302732,302735,302744,302748,302765,302766,302767,302769,302791,302792,302793,302807,302815,302820,302835,302857,302883,302918,302950,302960,302962,302969,302976,303009,303013,303016,303022,303049,303054,303061,303066,303074,303075,303097,303101,303107,303119,303131,303146,303167,303173,303175,303190,303195,303198,303202,303206,303220,303223,303250,303270,303281,303297,303312,303327,303353,303359,303394,303402,303406,303421,303435,303448,303474,303489,303495,303512,303528,303584,303593,303603,303605,303615,303623,303626,303656,303682,303686,303691,303704,303733,303748,303766,303782,303788,303810,303823,303834,303840,303855,303868,303881,303882,303947,303956,303966,303971,304003,304019,304024,304046,304078,304099,304130,304132,304154,304168,304184,304191,304217,304225,304241,304255,304262,304290,304305,304356,304382,304404,304407,304464,304481,304509,304532,304546,304564,304579,304591,304632,304644,304661,304681,304695,304740,304743,304768,304786,304787,304814,304827,304829,304853,304888,304905,304930,304971,304994,305000,305012,305035,305040,305071,305073,305093,305096,305115,305185,305237,305238,305260,305268,305273,305300,305303,305305,305317,305329,305334,305338,305353,305412,305415,305433,305434,305476,305601,305617,305669,305692,305726,305766,305789,305790,305808,305842,305860,305871,305881,305902,305903,305956,306027,306094,306132,306236,306238,306312,306314,306330,306368,306386,306429,306466,306468,306514,306539,306554,306675,306700,306763,306809,306819,306880,306915,306941,306944,306990,307014,307213,307290,307309,307353,307425,307457,307480,307500,307519,307569,307714,307728,307765,307792,307795,307825,307855,307865,307871,307872,307879,307972,307975,307992,308018,308024,308028,308043,308077,308104,308116,308136,308229,308277,308286,308372,308423,308521,308551,308559,308561,308582,308595,308640,308667,308671,308800,308808,308823,308849,308857,308869,308920,308934,308953,309003,309017,309032,309074,309078,309149,309213,309223,309234,309318,309393,309573,309593,309595,309627,309675,309683,309689,309742,309756,309765,309770,309780,309783,309801,309837,309896,309975,309983,310037,310087,310124,310140,310195,310198,310210,310290,310299,310310,310413,310461,310590,310599,310615,310616,310741,310792,310799,310804,310809,310866,310874,311153,311320,311358,311387,311392,311428,311561,311566,311640,311645,311744,311766,311960,311967,311988,312052,312057,312139,312240,312311,312393,312413,312436,312465,312587,312648,312667,312674,312804,312818,312937,312972,312978,313007,313329,313357,313398,313413,313494,313526,313609,313714,313795,313801,313804,313837,313847,313976,314016,314079,314097,314114,314130,314133,314173,314356,314409,314455,314506,314526,314580,314666,314692,314749,314772,314779,314848,315011,315043,315273,315283,315322,315334,315403,315453,315744,315839,315865,315873,315981,315984,316045,316096,316142,316161,316174,316302,316311,316318,316348,316407,316457,316469,316490,316529,316650,316759,316770,316859,316865,316907,317040,317080,317117,317229,317239,317515,317746,317789,317790,317844,317848,317869,317896,317907,317949,317956,317999,318049,318245,318280,318403,318562,318592,318644,318650,318704,318725,318745,318746,318747,318882,318980,319020,319077,319194,319439,319442,319451,319488,319506,319586,319600,319656,319666,319703,319735,319874,319934,319969,319970,319982,320015,320260,320268,320284,320313,320369,320370,320374,320387,320416,320419,320536,320555,320629,320713,320733,320739,320815,320827,320940,320975,320989,321015,321032,321040,321257,321530,321577,321693,321730,321763,321810,321882,321896,321914,321934,321939,321960,321967,321984,322014,322159,322239,322247,322323,322358,322445,322518,322579,322629,322781,322782,322795,322869,322933,323127,323222,323483,323559,323722,323744,323749,323807,323816,323836,323935,324127,324130,324238,324241,324287,324302,324555,324567,324620,324704,324731,324784,324905,325003,325084,325278,325429,325627,325642,325825,325837,325861,325885,325947,325978,326045,326134,326212,326234,326274,326306,326392,326394,326401,326450,326500,326608,326625,327013,327031,327057,327149,327256,327307,327346,327381,327400,327466,327584,327604,327609,328139,328210,328423,328425,328434,328485,328578,328716,328801,328826,328927,329028,329041,329065,329191,329268,329412,329505,329515,329576,329696,329826,330015,330089,330120,330139,330168,330314,330549,330583,330613,330640,330699,330751,330779,330839,330870,330941,330973,331089,331426,331464,331546,331732,331769,331905,331924,331947,331994,332175,332219,332233,332354,332607,332788,332827,332936,333119,333169,333286,333324,333425,333490,333544,333559,333605,333649,333653,333711,333737,333766,333846,333886,333931,334062,334114,334151,334176,334203,334221,334441,334483,334781,334832,335169,335180,335372,335434,335672,335936,335946,335961,335968,336076,336100,336209,336258,336336,336389,336492,336552,336591,336626,336725,336756,336865,336870,337050,337059,337182,337288,337321,337367,337399,337428,337429,337453,337459,337483,337635,337716,337775,337979,337994,337995,338030,338140,338348,338379,338438,338464,338478,338513,338564,338573,338718,338895,339049,339062,339150,339185,339277,339308,339359,339364,339365,339380,339510,339554,339565,339667,339882,339902,339921,339961,340018,340173,340208,340301,340304,340467,340511,340526,340544,340549,340550,340635,340721,340753,340845,340915,340960,341126,341127,341138,341141,341147,341217,341261,341311,341348,341365,341374,341397,341406,341450,341536,341543,341664,341739,341766,341792,341815,341837,341850,341859,341893,341899,341905,341926,341932,342009,342073,342087,342126,342152,342233,342330,342359,342424,342484,342500,342531,342653,342773,342808,342873,342886,342940,342943,342945,342953,342968,342979,343018,343095,343116,343147,343149,343240,343255,343265,343288,343472,343543,343631,343668,343687,343753,343825,343933,343972,344183,344239,344261,344329,344405,344435,344445,344452,344455,344530,344532,344630,344710,344730,344763,344826,344857,344875,344903,345014,345062,345106,345248,345373,345422,345496,345543,345624,345694,345713,345763,345780,345787,345803,345891,345964,346209,346316,346341,346384,346514,346563,346611,346699,346726,346841,346956,347127,347134,347260,347307,347369,347391,347490,347509,347534,347635,347682,347757,347760,347791,347811,347863,348024,348080,348097,348116,348243,348249,348302,348484,348519,348649,348650,348655,348661,348670,348689,348711,348728,348820,348906,348940,348980,349060,349115,349166,349206,349356,349398,349402,349545,349600,349602,349694,349727,349782,349853,349915,349974,350035,350066,350259,350326,350327,350336,350441,350524,350565,350651,350695,350723,351015,351026,351060,351113,351118,351184,351256,351301,351319,351393,351425,351492,351493,351611,351694,351715,351734,351831,351871,351939,351967,352051,352057,352170,352177,352208,352217,352233,352616,352665,352733,352735,352773,352775,352884,352889,352952,353024,353112,353361,353409,353466,353470,353572,353736,353824,353854,353885,353916,353996,353998,354077,354084,354109,354123,354139,354370,354384,354442,354483,354536,354671,354711,354768,354840,355018,355123,355140,355154,355163,355234,355279,355307,355430,355615,355639,355791,355819,355899,355959,356017,356188,356210,356316,356317,356355,356460,356479,356568,356756,356813,356841,356889,356925,356971,356974,357011,357081,357178,357199,357273,357279,357291,357329,357384,357510,357599,357665,357710,357757,357841,357852,357908,357939,357966,357975,357984,358021,358032,358042,358109,358188,358237,358260,358366,358375,358388,358392,358497,358554,358702,358781,358817,358823,358885,358955,359038,359060,359077,359161,359259,359371,359461,359482,359574,359698,359699,359802,359901,359927,359931,359977,360064,360078,360124,360243,360267,360284,360303,360310,360388,360445,360457,360502,360509,360550,360608,360724,360811,360877,360958,361058,361091,361290,361435,361449,361591,361641,361650,361659,361683,361717,361744,361896,361955,361965,362015,362019,362085,362110,362175,362259,362335,362351,362437,362485,362515,362585,362619,362748,362750,362770,362791,362904,362983,363033,363054,363171,363184,363297,363439,363459,363501,363555,363588,363589,363599,363613,363643,363723,363791,363913,363998,364030,364355,364565,364569,364573,364593,364607,364623,364714,364736,364799,364823,364921,365003,365013,365118,365218,365261,365284,365305,365307,365311,365352,365394,365398,365504,365541,365580,365632,365965,366048,366053,366100,366127,366230,366254,366302,366422,366508,366511,366532,366587,366637,366689,366723,366753,366939,366962,366973,366986,367039,367145,367161,367237,367254,367271,367272,367382,367537,367610,367625,367630,367693,367707,367802,367891,367918,367999,368058,368110,368143,368197,368202,368381,368390,368430,368551,368566,368576,368599,368609,368633,368640,368800,368805,368819,368853,368876,368943,368944,368958,368967,368979,368990,369031,369055,369110,369122,369151,369153,369199,369242,369279,369288,369338,369340,369382,369429,369448,369572,369594,369654,369676,369732,369733,369756,369759,369792,369794,369815,369847,369857,370011,370047,370088,370213,370354,370426,370440,370485,370495,370509,370513,370533,370561,370626,370655,370668,370669,370751,370807,370871,370884,370891,370895,370969,371124,371128,371185,371224,371225,371244,371254,371344,371359,371360,371370,371372,371383,371410,371415,371471,371508,371510,371511,371547,371668,371684,371722,371785,371832,371851,371903,371938,372039,372048,372063,372065,372078,372098,372130,372198,372250,372277,372304,372337,372367,372369,372401,372424,372425,372428,372435,372444,372453,372482,372537,372548,372573,372589,372615,372618,372633,372705,372727,372761,372800,372817,372838,372873,372891,372916,372919,372933,372935,372944,372958,372963,372971,373041,373058,373196,373237,373280,373290,373402,373450,373453,373479,373522,373541,373553,373600,373660,373674,373779,373816,373891,373897,373960,373979,373985,373994,374015,374131,374166,374179,374248,374263,374273,374304,374311,374344,374349,374373,374382,374465,374498,374530,374545,374741,374743,374779,374858,374878,374926,375007,375044,375049,375069,375106,375123,375129,375155,375208,375231,375305,375338,375350,375357,375374,375391,375435,375495,375589,375617,375710,375810,375884,375922,375925,375930,375944,375980,376016,376020,376025,376070,376073,376189,376191,376251,376257,376286,376292,376332,376386,376455,376467,376533,376548,376619,376638,376714,376731,376740,376756,376784,376823,376884,376918,376938,376961,376965,376969,376979,376981,376987,376996,376997,377000,377051,377096,377103,377115,377143,377169,377328,377376,377574,377575,377627,377633,377658,377668,377715,377734,377753,377770,377807,377844,377868,377928,377966,377982,378069,378104,378129,378259,378269,378283,378327,378435,378463,378537,378629,378645,378726,378792,378794,378797,378840,378913,378934,378978,378996,379000,379023,379025,379030,379067,379080,379112,379164,379183,379292,379346,379492,379498,379499,379571,379625,379662,379670,379690,379697,379717,379728,379749,379759,379818,379846,379880,379969,379989,380010,380051,380192,380244,380316,380332,380351,380361,380384,380413,380450,380536,380545,380553,380556,380664,380769,380775,380890,380908,380989,381022,381073,381194,381220,381262,381284,381297,381313,381350,381418,381498,381557,381559,381604,381688,381695,381794,381805,381819,381827,381839,381853,381913,381928,381953,381956,381967,381995,382007,382009,382090,382098,382126,382199,382205,382206,382261,382280,382315,382323,382343,382348,382354,382366,382378,382389,382433,382443,382468,382593,382612,382667,382688,382729,382809,382815,382878,382943,382996,383001,383067,383077,383095,383102,383131,383183,383197,383224,383255,383316,383365,383376,383443,383490,383655,383675,383694,383696,383702,383709,383732,383817,383823,383846,383897,383913,383925,384049,384055,384057,384091,384098,384140,384141,384144,384146,384163,384228,384351,384399,384419,384624,384709,384733,384754,384787,384792,384840,384864,384915,384965,384992,385006,385019,385042,385068,385205,385233,385322,385341,385372,385459,385475,385496,385695,385762,385821,385874,385882,385918,385933,385978,386019,386030,386036,386068,386153,386189,386193,386202,386226,386230,386320,386323,386329,386336,386350,386355,386470,386479,386489,386558,386629,386661,386687,386694,386696,386711,386747,386761,386806,386824,386850,386852,386862,386865,386896,386897,386906,386922,386941,386953,387038,387043,387057,387102,387107,387126,387150,387179,387206,387230,387265,387320,387363,387397,387421,387425,387503,387521,387622,387667,387671,387802,387951,388037,388088,388131,388148,388154,388203,388211,388238,388260,388289,388346,388465,388476,388488,388498,388519,388550,388620,388635,388642,388654,388664,388693,388718,388730,388760,388968,388970,389018,389029,389128,389129,389133,389156,389183,389193,389198,389203,389223,389240,389285,389293,389342,389360,389382,389392,389407,389563,389631,389646,389694,389817,389829,389865,389885,389938,389941,389978,389980,389986,390003,390009,390127,390285,390324,390338,390341,390355,390375,390451,390477,390489,390507,390512,390537,390545,390722,390763,390765,390767,390803,391091,391098,391146,391156,391158,391205,391481,391528,391611,391768,391830,391848,391906,392038,392121,392126,392210,392555,392586,392594,392627,392848,392874,392879,393022,393062,393063,393070,393152,393366,393416,393449,393648,393935,394046,394090,394192,394193,394277,394311,394325,394363,394475,394517,394650,394686,394923,394930,394935,395045,395092,395135,395141,395148,395407,395484,395528,395810,395922,395936,395944,396541,396713,396812,396817,396828,396855,396936,396948,396971,396994,397002,397059,397076,397169,397178,397848,397890,397932,397933,398092,398114,398139,398162,398449,398604,398661,398667,398689,398695,399152,399157,399225,399354,399355,399367,399379,399492,399500,399601,399650,399668,399683,399685,399754,399783,399789,399816,399905,399934,399971,399983,400010,400034,400072,400138,400151,400216,400246,400294,400319,400333,400375,400437,400506,400537,400583,400594,400607,400608,400661,400672,400673,400690,400735,400875,400876,400879,400884,400939,400947,400948,401012,401037,401134,401165,401179,401200,401219,401252,401280,401282,401296,401328,401395,401429,401438,401470,401538,401581,401596,401724,401754,401790,401812,401868,401945,401994,402067,402140,402180,402238,402265,402292,402399,402415,402437,402446,402477,402491,402544,402587,402602,402623,402707,402714,402747,402754,402812,402830,402838,402938,402975,402981,402999,403103,403112,403142,403172,403282,403284,403294,403300,403332,403362,403420,403436,403480,403518,403549,403605,403606,403630,403670,403692,403733,403746,403780,403818,403895,403912,403918,403956,404180,404246,404373,404463,404472,404548,404574,404734,404741,404813,404924,404951,405108,405125,405151,405176,405610,405645,405659,405698,405704,405821,405830,405844,405851,405905,405912,405953,406035,406037,406045,406054,406069,406085,406148,406165,406172,406174,406184,406228,406257,406439,406586,406662,406996,407041,407290,407461,407471,407505,407541,407542,407592,407597,407878,407975,407991,407999,408099,408133,408601,408622,408627,409012,409052,409306,409313,409510,409514,409525,409732,410076,410083,410512,410530,410533,410601,410604,410671,410688,410776,410788,410797,410930,410946,410957,410962,410977,410980,411017,411028,411061,411170,411195,411275,411306,411354,411373,411404,411512,411527,411576,411592,411659,411755,411816,411817,411839,411875,411957,411969,412034,412124,412152,412181,412202,412223,412244,412272,412276,412277,412360,412451,412565,412586,412644,412722,412945,412955,413092,413132,413155,413201,413227,413293,413398,413399,413443,413483,413507,413515,413530,413532,413541,413547,413574,413591,413661,413777,413922,414117,414139,414147,414418,414435,414525,414925,415141,415145,415160,415208,415223,415231,415283,415285,415297,415316,415427,415591,415875,415878,416215,416534,416863,416949,417079,417086,417092,417257,417311,417566,417573,417807,417861,417966,418623,418720,418726,418790,418821,418829,419388,419611,420287,420330,420349,420392,420442,420750,421062,421128,421171,421192,421194,421201,421225,421267,421278,421285,421293,421295,421560,421578,421609,421610,421629,421654,421684,421693,421708,421710,421719,421811,421825,421833,421869,422074,422097,422176,422237,422425,422599,422804,423125,423688,423758,423779,423948,423972,424000,424005,424020,424046,424094,424102,424388,424394,424411,424427,424530,424799,424820,424849,424889,424938,424954,424957,424963,424966,424969,424976,425011,425087,425094,425330,425350,425514,425624,425721,425777,426211,426275,426416,426651,426708,426769,426866,427145,427157,427165,427175,427208,427240,427282,427500,427626,427634,427852,428014,428022,428058,428141,428179,428192,428219,428255,428296,428370,428495,428780,428838,428912,428934,428943,428953,428954,428966,428995,429000,429128,429155,429156,429257,429327,429412,429440,429462,429469,429628,429645,429690,429712,429742,429770,429846,429868,430027,430055,430118,430324,431042,431128,431144,431185,431188,431213,431406,431444,431470,431540,431616,431620,432167,432179,432349,432418,432420,432514,432597,432661,432664,432731,432772,432830,432850,432896,432932,433023,433079,433081,433123,433150,433154,433172,433187,433211,433260,433328,433432,433483,434004,434142,434341,434491,434503,434555,434691,434962,435162,435369,435400,435447,435513,435557,435582,435729,435787,435855,436373,436677,436693,436792,437020,437026,437067,437094,437230,437243,437343,437344,437354,437400,437475,437529,437597,437649,437664,437672,437694,437973,437997,438331,438346,438474,438584,438749,438759,438875,438960,439116,311166,10,413535,337620,317530,301439,343424) -- contest winner or shortlister
)
UNION -- подключен Услуга выше в каталоге
SELECT catalog_top_bind.uid AS uid
FROM shop_catalog_top_bind AS catalog_top_bind
-- LEFT JOIN user_specs ON user_specs.uid = catalog_top_bind.uid AND user_specs.is_primary IS TRUE
WHERE catalog_top_bind.bind_to > NOW()
AND get_acc_status(catalog_top_bind.uid) = 2
) AS freelancers
0.011661052703857
Array
(
)
SELECT us.uid, us.spec AS spec_id,
CASE WHEN us.is_primary IS TRUE THEN 1 ELSE 0 END AS is_primary
FROM user_specs us
WHERE us.uid IN (10,11,71,72,93,300079,300084,300085,300088,300112,300114,300127,300148,300166,300227,300276,300314,300319,300335,300358,300367,300372,300393,300402,300449,300926,301077,301184,301341,301352,301578,301631,301649,301749,302437,302443,302461,302495,302735,302766,302792,302883,303013,303202,303281,303603,303810,304024,304130,304695,304930,305040,305093,305329,305334,306027,306941,307879,309689,310413,310590,311320,314097,316490,318562,318980,319488,319666,320370,325084,325885,326212,328425,329191,329505,334151,334176,334441,334483,337483,342193,343095,343149,345248,345624,346209,346384,348024,349694,349782,350441,351015,351113,351150,352217,355819,355899,356813,359931,360123,360388,360811,360958,362748,363501,364714,365352,366723,367271,368958,371903,372838,373479,373600,373960,373985,374273,374779,375930,376455,376987,377143,377928,378259,378463,379025,379164,379625,379690,379697,379749,380384,381794,381827,382126,382205,382348,382443,383095,383696,383817,383897,384351,385019,385475,386355,386558,386906,386953,387206,387951,388088,388203,388635,389203,389885,389938,389986,390438,390803,391091,391098,392126,393366,395407,396812,396971,396994,398114,399152,399225,399650,399816,400246,400294,400375,400537,400672,401200,401328,401596,401754,402747,403294,403436,403692,403733,403780,404574,404741,404924,405176,405830,405912,406054,407505,407878,408099,410512,410530,410671,411170,411275,411306,411404,411592,411816,412034,412152,412181,412202,412223,412565,412586,412722,413155,413507,413541,414117,414925,415283,415285,415427,417257,418623,418720,419388,420392,420775,421062,421171,421293,421693,421833,422074,422425,422599,423779,423948,424046,424969,424976,425388,425514,426275,427157,427240,427282,427500,428179,428219,428255,428495,429086,429690,429742,431188,432179,432420,432661,433023,433079,433172,434142,434962,438474,438749,439076)
AND spec_parent(us.spec) = 1
ORDER BY us.uid, us.is_primary DESC
0.0010871887207031
Array
(
)
SELECT "specs".* FROM "boutique"."specs" WHERE (id IN (117, 598, 69, 116, 40, 124, 593, 29, 4))
0.0030698776245117
Array
(
)
SELECT
a.attnum,
n.nspname,
c.relname,
a.attname AS colname,
t.typname AS type,
a.atttypmod,
FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,
pg_get_expr(d.adbin, d.adrelid) AS default_value, --d.adsrc AS default_value,
a.attnotnull AS notnull,
a.attlen AS length,
co.contype,
ARRAY_TO_STRING(co.conkey, ',') AS conkey
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
JOIN pg_type AS t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid
AND a.attnum = ANY(co.conkey) AND co.contype = 'p')
LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND c.relname = 'shop_catalog_top_bind' ORDER BY a.attnum
0.00061202049255371
Array
(
)
SELECT "shop_catalog_top_bind".* FROM "shop_catalog_top_bind" WHERE (bind_to > CURRENT_TIMESTAMP)
0.0043060779571533
Array
(
)
SELECT freelancer.* FROM
(
SELECT DISTINCT acc.id AS uid,
acc.last_act AS last_act,
rating_boutique.rating,
top_bind.sort AS top_bind_sort,
pro_bind.uid IS NOT NULL AS is_pro,
uspec.spec AS spec
FROM accounts AS acc
LEFT JOIN user_specs AS uspec ON acc.id = uspec.uid AND uspec.is_primary
LEFT JOIN user_rating_boutique AS rating_boutique ON rating_boutique.uid = acc.id
LEFT JOIN shop_catalog_top_bind AS top_bind ON top_bind.uid = acc.id
LEFT JOIN shop_pro_account_bind AS pro_bind ON pro_bind.uid = acc.id
WHERE acc.id IN(11,71,300335,300449,301749,302735,302766,302792,303281,304130,305040,305093,305329,305334,306941,314097,316490,318980,319666,345624,349782,351150,355899,360123,365352,366723,368958,379025,386953,389885,391098,400672,406054,410671,411306,412586,414117,420775,422599,425388,428495,429690,433172,434142,434962)
) AS freelancer
ORDER BY
freelancer.top_bind_sort DESC NULLS LAST,
freelancer.is_pro DESC NULLS LAST,
freelancer.rating DESC NULLS LAST,
freelancer.last_act DESC NULLS LAST,
freelancer.uid
LIMIT 100 OFFSET 0
0.0037360191345215
Array
(
)
SELECT
a.attnum,
n.nspname,
c.relname,
a.attname AS colname,
t.typname AS type,
a.atttypmod,
FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,
pg_get_expr(d.adbin, d.adrelid) AS default_value, --d.adsrc AS default_value,
a.attnotnull AS notnull,
a.attlen AS length,
co.contype,
ARRAY_TO_STRING(co.conkey, ',') AS conkey
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
JOIN pg_type AS t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid
AND a.attnum = ANY(co.conkey) AND co.contype = 'p')
LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND c.relname = 'accounts' AND n.nspname = 'boutique' ORDER BY a.attnum
SELECT uid,
COUNT(*) FILTER (WHERE ball > 0) AS positive,
COUNT(*) FILTER (WHERE ball < 0) AS negative,
COUNT(*) AS total
FROM reviews
WHERE uid IN (425388,420775,360123,351150,304130,306941,11,400672,316490,410671,302735,411306,434962,303281,318980,302792,379025,434142,305334,300335,301749,365352,433172,391098,300449,368958,349782,406054,305329,422599,386953,302766,366723,355899,429690,314097,71,305093,319666,414117,412586,389885,428495,305040,345624)
AND get_acc_status(writer) IN (2,6)
AND deleted = false
GROUP BY uid
0.0030760765075684
Array
(
)
SELECT
a.attnum,
n.nspname,
c.relname,
a.attname AS colname,
t.typname AS type,
a.atttypmod,
FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,
pg_get_expr(d.adbin, d.adrelid) AS default_value, --d.adsrc AS default_value,
a.attnotnull AS notnull,
a.attlen AS length,
co.contype,
ARRAY_TO_STRING(co.conkey, ',') AS conkey
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
JOIN pg_type AS t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid
AND a.attnum = ANY(co.conkey) AND co.contype = 'p')
LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND c.relname = 'service_kit' AND n.nspname = 'boutique' ORDER BY a.attnum
0.0033860206604004
Array
(
)
SELECT "service_kit".* FROM "boutique"."service_kit" WHERE (uid IN (425388, 420775, 360123, 351150, 304130, 306941, 11, 400672, 316490, 410671, 302735, 411306, 434962, 303281, 318980, 302792, 379025, 434142, 305334, 300335, 301749, 365352, 433172, 391098, 300449, 368958, 349782, 406054, 305329, 422599, 386953, 302766, 366723, 355899, 429690, 314097, 71, 305093, 319666, 414117, 412586, 389885, 428495, 305040, 345624)) AND (published IS TRUE) AND (deleted IS NULL) AND (approved IS NOT NULL) ORDER BY "uid" ASC, "id" ASC
0.0068619251251221
Array
(
)
SELECT uid, tagline, slogan FROM about WHERE uid IN (425388,420775,360123,351150,304130,306941,11,400672,316490,410671,302735,411306,434962,303281,318980,302792,379025,434142,305334,300335,301749,365352,433172,391098,300449,368958,349782,406054,305329,422599,386953,302766,366723,355899,429690,314097,71,305093,319666,414117,412586,389885,428495,305040,345624)
0.00085687637329102
Array
(
)
SELECT "specs".* FROM "boutique"."specs" WHERE (id IN (4, 117, 116, 40, 124, 598))
0.001244068145752
Array
(
)
SELECT uid, url_alias FROM user_url WHERE uid IN (425388,420775,360123,351150,304130,306941,11,400672,316490,410671,302735,411306,434962,303281,318980,302792,379025,434142,305334,300335,301749,365352,433172,391098,300449,368958,349782,406054,305329,422599,386953,302766,366723,355899,429690,314097,71,305093,319666,414117,412586,389885,428495,305040,345624) AND active IS true ORDER BY create_date DESC
0.0022108554840088
Array
(
)
SELECT
a.attnum,
n.nspname,
c.relname,
a.attname AS colname,
t.typname AS type,
a.atttypmod,
FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,
pg_get_expr(d.adbin, d.adrelid) AS default_value, --d.adsrc AS default_value,
a.attnotnull AS notnull,
a.attlen AS length,
co.contype,
ARRAY_TO_STRING(co.conkey, ',') AS conkey
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
JOIN pg_type AS t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid
AND a.attnum = ANY(co.conkey) AND co.contype = 'p')
LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND c.relname = 'shop_pro_account_bind' ORDER BY a.attnum
0.00079703330993652
Array
(
)
SELECT "shop_pro_account_bind".* FROM "shop_pro_account_bind" WHERE (pro_to > CURRENT_TIMESTAMP)
0.0025150775909424
Array
(
)
SELECT DISTINCT "contest_winners"."uid" FROM "contest_winners"
0.0052459239959717
Array
(
)
SELECT
a.attnum,
n.nspname,
c.relname,
a.attname AS colname,
t.typname AS type,
a.atttypmod,
FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,
pg_get_expr(d.adbin, d.adrelid) AS default_value, --d.adsrc AS default_value,
a.attnotnull AS notnull,
a.attlen AS length,
co.contype,
ARRAY_TO_STRING(co.conkey, ',') AS conkey
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
JOIN pg_type AS t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid
AND a.attnum = ANY(co.conkey) AND co.contype = 'p')
LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND c.relname = 'contest_specs' ORDER BY a.attnum
0.0016870498657227
Array
(
)
SELECT "contest_specs".* FROM "contest_specs" WHERE ( disabled_finish_datetime
0.0043880939483643
Array
(
)
SELECT
a.attnum,
n.nspname,
c.relname,
a.attname AS colname,
t.typname AS type,
a.atttypmod,
FORMAT_TYPE(a.atttypid, a.atttypmod) AS complete_type,
pg_get_expr(d.adbin, d.adrelid) AS default_value, --d.adsrc AS default_value,
a.attnotnull AS notnull,
a.attlen AS length,
co.contype,
ARRAY_TO_STRING(co.conkey, ',') AS conkey
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
JOIN pg_type AS t ON a.atttypid = t.oid
LEFT OUTER JOIN pg_constraint AS co ON (co.conrelid = c.oid
AND a.attnum = ANY(co.conkey) AND co.contype = 'p')
LEFT OUTER JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum = a.attnum
WHERE a.attnum > 0 AND c.relname = 'specs' AND n.nspname = 'boutique' ORDER BY a.attnum
0.0015130043029785
Array
(
)
SELECT "specs".* FROM "boutique"."specs" WHERE (parent=1) ORDER BY "prio" ASC, "name" ASC